srsRAN Docs
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
srsran Namespace Reference

Namespaces

namespace  ldpc
 LDPC constants and helper functions.
 

Classes

struct  amf_appconfig
 
struct  amplitude_control_appconfig
 Amplitude control application configuration. More...
 
class  amplitude_controller
 Describes an amplitude controller interface. More...
 
struct  amplitude_controller_clipping_config
 Describes an amplitude controller configuration for the clipping implementation. More...
 
class  amplitude_controller_clipping_impl
 Clipping amplitude controller implementation. More...
 
class  amplitude_controller_factory
 Describes an amplitude controller factory. More...
 
struct  amplitude_controller_metrics
 Power measurements and runtime metrics reported by the amplitude controller. More...
 
class  amplitude_controller_scaling_impl
 Scaling amplitude controller implementation. More...
 
class  app_state_notifier
 Notifier from application to signal current operation state. More...
 
class  async_event_source
 Publisher of async events. One single subscriber/listener/observer of type async_event_subscriber can subscribe to this class to listen for incoming messages. More...
 
class  async_queue
 
class  async_single_event_observer
 Awaitable type that implements a observer/subscriber/listener for a single async event. This awaitable is single-use, meaning that after it auto-unsubscribes after receiving a message from the event source/publisher. More...
 
class  async_task
 
class  backend_pcap_writer
 This class provides a thread-safe interface to write to the pcap file, by only allowing accesses to the file via a single executor. More...
 
struct  base_cell_appconfig
 Base cell configuration. More...
 
struct  base_resumable_procedure
 Base class for resumable tasks that are not coroutines. More...
 
class  base_task_strand
 Base class for task strand implementations. More...
 
class  baseband_gateway
 Describes a baseband gateway interface. More...
 
class  baseband_gateway_base
 Describes the base interface for baseband gateway interfaces. More...
 
class  baseband_gateway_buffer_dynamic
 Describes a baseband buffer implementation that comprises a fix number of channels that can be dynamically resized. More...
 
class  baseband_gateway_buffer_reader
 Read-only baseband buffer interface. More...
 
class  baseband_gateway_buffer_reader_view
 Implements a baseband gateway buffer reader view based on another reader. More...
 
class  baseband_gateway_buffer_writer
 Read-write baseband buffer interface. More...
 
class  baseband_gateway_buffer_writer_view
 Implements a baseband gateway buffer writer view based on another writer. More...
 
class  baseband_gateway_receiver
 Baseband gateway - reception interface. More...
 
class  baseband_gateway_transmitter
 Baseband gateway - transmission interface. More...
 
struct  baseband_gateway_transmitter_metadata
 Baseband transmitter metadata parameters. More...
 
class  benchmarker
 Describes a class for performing benchmarks. More...
 
struct  beta_offsets
 BetaOffsets, as per TS 38.331. These values are mapped into floats as per Tables in Section 9.3, TS 38.213. More...
 
class  bit_buffer
 Describes a bit buffer that contains packed bits. More...
 
class  bit_decoder
 Decoder of bits stored in a byte_buffer. More...
 
class  bit_encoder
 Encoder of bits in a byte buffer. More...
 
class  blocking_queue
 
class  blocking_task_worker
 Contrarily to other type of workers, this worker runs in the same thread where run() is called. run() is blocking. More...
 
class  bounded_bitset
 Represents a dynamically-sized bitset with an upper bound capacity of N bits. More...
 
class  bounded_integer
 This class represents an integer whose value is within the set of possible values: {MIN_VALUE, ..., MAX_VALUE}. More...
 
struct  bounded_integer_invalid_tag
 Tag used to initialize a bounded_integer in invalid state. More...
 
struct  bsr_config
 BSR-Config, TS 38.331. More...
 
struct  buffer_pool_appconfig
 
struct  bwp_configuration
 
struct  bwp_downlink
 "BWP-Downlink" as per TS 38.331. More...
 
struct  bwp_downlink_common
 
struct  bwp_downlink_dedicated
 "BWP-DownlinkDedicated" as per TS 38.331. More...
 
struct  bwp_info
 Grouping of common and UE-dedicated information associated with a given BWP. More...
 
struct  bwp_rb_bitmap
 
struct  bwp_sch_grant_info
 Parameters of a PDSCH or PUSCH grant allocation within a BWP. More...
 
struct  bwp_uplink_common
 
struct  bwp_uplink_dedicated
 
class  byte_buffer
 Byte sequence, which represents its data in memory via an intrusive linked list of memory chunks. This container is not contiguous in memory. Default copy ctor and assignment is disabled in this container. The user should instead std::move to transfer ownership, .copy() for shallow copies with shared ownership and .deep_copy() for byte-wise copies. More...
 
class  byte_buffer_chain
 This class represents the concatenation of several individual data packets. The class iterator type automatically traverses the concatenated data_packets in a byte by byte fashion. More...
 
class  byte_buffer_reader
 Used to read a range of bytes stored in a byte_buffer. More...
 
class  byte_buffer_slice
 This class represents a sub-interval or make_slice of a potentially larger byte_buffer. Like byte_buffer and byte_buffer_view, the represented bytes by this class are not contiguous in memory. Contrarily to byte_buffer_view, this class retains shared ownership of the segments held by the byte_buffer which it references. Due to the shared ownership model, the usage of this class may involve additional overhead associated with reference counting, which does not take place when using byte_buffer_view. More...
 
class  byte_buffer_view
 Non-owning view to a byte sequence. The underlying byte sequence is not contiguous in memory. Instead, it is represented as an intrusive linked list of byte buffer segments, where each segment contains a span of bytes. More...
 
class  byte_buffer_writer
 Used to write into a range of bytes stored in a byte_buffer. More...
 
struct  carrier_configuration
 Configuration of each transmission point associated to the corresponding cell(s). This includes different physical antennas, different frequencies, bandwidths. More...
 
class  carrier_subslot_resource_grid
 Represents the Symbol x CRB resource grid of a DL/UL Carrier. The number of CRBs of the grid will depend on the carrier bandwidth and numerology used. More...
 
struct  cce_position
 
struct  cell_appconfig
 Cell configuration. More...
 
struct  cell_config_builder_params
 Main cell parameters from which other cell parameters (e.g. coreset0, BWP RBs) will be derived. More...
 
struct  cell_config_dedicated
 UE-dedicated configuration for serving cell, as per TS38.331. More...
 
class  cell_configuration
 
class  cell_executor_mapper
 Mapper of task executors used by the MAC DL, RLC DL and MAC scheduler for low-latency tasks. The task executors can be mapped based on cell index or type of task (slot indication vs others). More...
 
struct  cell_ph_report
 UL Power Headroom Report (PHR) of a cell. More...
 
struct  cell_resource_allocator
 
class  cell_scheduler
 This class holds all the resources that are specific to a cell. This includes the SIB and RA scheduler objects, PDCCH scheduler object, the cell resource grid, etc. More...
 
struct  cell_selection_info
 
struct  cell_slot_resource_allocator
 Stores all the scheduled information relative to a {slot, cell}. More...
 
class  cell_slot_resource_grid
 Manages the allocation of RBs in the resource grid of a given service cell for a given slot. This class manages multiple carriers of different numerologies associated to the same cell. More...
 
class  channel_equalizer
 Channel equalizer interface. More...
 
class  channel_equalizer_factory
 Describes a channel equalizer factory. More...
 
class  channel_equalizer_zf_impl
 Channel equalizer implementation using the Zero Forcing algorithm. More...
 
class  channel_estimate
 Describes channel estimation results. More...
 
class  channel_modulation_factory
 
class  channel_precoder
 Channel precoder interface. More...
 
class  channel_precoder_avx2
 Channel precoder implementation. More...
 
class  channel_precoder_avx512
 Channel precoder implementation. More...
 
class  channel_precoder_factory
 Factory that builds channel precoder objects. More...
 
class  channel_precoder_generic
 Channel precoder implementation. More...
 
class  channel_precoder_impl
 Channel precoder implementation. More...
 
class  channel_precoder_neon
 Channel precoder implementation. More...
 
class  channel_state_information
 Channel State Information parameters. More...
 
class  circular_array
 
class  circular_map
 
struct  codeblock_metadata
 Describes a codeblock. More...
 
struct  codebook_config
 CodebookConfig is used to configure codebooks of Type-I and Type-II. More...
 
class  colocated_f1ap_pdu_handler
 
struct  common_network_gateway_config
 Generic network gateway interfaces to connect components to the outside world. More...
 
class  complex_normal_distribution
 Complex normal distribution. More...
 
class  concurrent_free_memory_block_list
 memory_block stack that mutexes pushing/popping More...
 
class  concurrent_priority_queue
 Concurrent priority queue, where the caller specifies the element priority statically while pushing it to the queue. More...
 
class  concurrent_queue
 A concurrent queue that can be used to pass objects between threads. Different policies are supported: More...
 
struct  concurrent_queue_params
 Parameters used to construct a concurrent queue. More...
 
class  concurrent_thread_local_object_pool
 Concurrent pool of instances that are accessed depending on the thread. More...
 
struct  copyonly_test_object
 Test object to verify correct copy ctor/assignment logic. More...
 
struct  coreset_configuration
 
struct  coro_handle
 Coroutine handle that will be passed between awaitables. More...
 
struct  coro_handle< void >
 Specialization with common functionality that is independent of promise type. More...
 
struct  cpu_affinities_appconfig
 CPU affinities configuration for the gNB app. More...
 
struct  cpu_affinities_cell_appconfig
 CPU affinities configuration for the cell. More...
 
struct  crb_interval
 Struct to express a {min,...,max} range of CRB indexes within a carrier. More...
 
class  crc_calculator
 Calculates the CRC, as per TS38.212 Section 5.1. Interface. More...
 
class  crc_calculator_clmul_impl
 CRC calculator implementation based on the PCLMULQDQ instruction. More...
 
class  crc_calculator_factory
 
class  crc_calculator_generic_impl
 CRC calculator generic implementation. More...
 
class  crc_calculator_lut_impl
 CRC calculator based on look-up tables. More...
 
struct  crit_diagnostics_item
 
struct  crit_diagnostics_t
 
struct  csi_aperiodic_trigger_state
 See TS 38.331, CSI-AperiodicTriggerState. More...
 
struct  csi_appconfig
 
struct  csi_associated_report_config_info
 See TS 38.331, CSI-AssociatedReportConfigInfo. More...
 
struct  csi_im_resource
 CSI-IM-Resource is used to configure one CSI Interference Management (IM) resource. More...
 
struct  csi_im_resource_set
 
struct  csi_meas_config
 CSI-MeasConfig is used to configure CSI-RS belonging to the serving cell in which CSI-MeasConfig is included. More...
 
struct  csi_report_config
 
struct  csi_report_configuration
 Collects Chanel State Information (CSI) report configuration parameters. More...
 
struct  csi_report_data
 Collects Chanel State Information (CSI) report fields. More...
 
struct  csi_report_pmi
 Precoding Matrix Indicator (PMI). More...
 
struct  csi_report_pusch_size
 Collects the parameters that describe the CSI report size transmitted in PUSCH. More...
 
struct  csi_resource_config
 
struct  csi_rs_info
 Stores the information associated with a CSI-RS signalling. More...
 
struct  csi_rs_pattern
 Describes the CSI-RS pattern in the resource grid. More...
 
struct  csi_rs_pattern_configuration
 Collects the parameters that describe a CSI-RS allocation pattern in a resource grid. More...
 
struct  csi_rs_pattern_port
 Describes the CSI-RS pattern within a PRB for a given port. More...
 
struct  csi_rs_resource_mapping
 
class  csi_rs_scheduler
 
struct  csi_semi_persistent_on_pusch_trigger_state
 See TS 38.331, CSI-SemiPersistentOnPUSCH-TriggerState. More...
 
struct  csi_ssb_resource_set
 
struct  cu_cp_appconfig
 
struct  cu_cp_cell_appconfig_item
 Each item describes the relationship between one cell to all other cells. More...
 
struct  cu_cp_neighbor_cell_appconfig_item
 
struct  cu_cp_report_appconfig
 Report configuration, for now only supporting the A3 event. More...
 
struct  cu_up_appconfig
 
struct  cu_up_e1_setup_request
 CU-UP initiated E1 setup request. More...
 
struct  cu_up_e1_setup_response
 Response to CU-UP initiated E1 setup request. More...
 
class  cu_up_executor_pool
 Interface used to access different executors used in the CU-UP. More...
 
class  cyclic_prefix
 Describes a cyclic prefix configuration with its helper methods. More...
 
struct  dci_0_0_c_rnti_configuration
 Required parameters for packing a DCI format 0_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI. More...
 
struct  dci_0_0_size
 DCI format 0_0 payload size parameters. More...
 
struct  dci_0_0_tc_rnti_configuration
 Required parameters for packing a DCI format 0_0 scrambled by TC-RNTI. More...
 
struct  dci_0_1_configuration
 Required parameters for packing a DCI format 0_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI. More...
 
struct  dci_0_1_size
 DCI format 0_1 payload size parameters. More...
 
struct  dci_1_0_c_rnti_configuration
 Required parameters for packing a DCI format 1_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI. More...
 
struct  dci_1_0_p_rnti_configuration
 Required parameters for packing a DCI format 1_0 scrambled by P-RNTI. More...
 
struct  dci_1_0_ra_rnti_configuration
 Required parameters for packing a DCI format 1_0 scrambled by RA-RNTI. More...
 
struct  dci_1_0_si_rnti_configuration
 Required parameters for packing a DCI format 1_0 scrambled by SI-RNTI. More...
 
struct  dci_1_0_size
 DCI format 1_0 payload size parameters. More...
 
struct  dci_1_0_tc_rnti_configuration
 Required parameters for packing a DCI format 1_0 scrambled by TC-RNTI. More...
 
struct  dci_1_1_configuration
 Required parameters for packing a DCI format 1_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI. More...
 
struct  dci_1_1_size
 DCI format 1_1 payload size parameters. More...
 
struct  dci_context_information
 
struct  dci_dl_info
 Describes an unpacked DL DCI message. More...
 
struct  dci_rar_configuration
 Collects the Random Access Response grant content fields described by TS38.213 Table 8.2-1. More...
 
struct  dci_size_config
 DCI configuration parameters required to perform the DCI size alignment procedure. More...
 
struct  dci_sizes
 DCI payload sizes. More...
 
struct  dci_ul_info
 
struct  decoded_mac_rx_pdu
 Stores MAC RX PDU, as well as any contextual or temporary information related to the PDU decoding. More...
 
struct  default_error_t
 
struct  default_success_t
 
class  delimited_formatter
 Format helper used to insert delimiters between structure fields. More...
 
class  demodulation_mapper
 Demodulator interface. More...
 
class  demodulation_mapper_impl
 Approximate-LLR demodulator. More...
 
class  described_segment
 Describes an LDPC segment or codeblock. More...
 
class  dft_processor
 Describes a Discrete Fourier Transform (DFT) processor. More...
 
class  dft_processor_factory
 Discrete Fourier Transform (DFT) processor factory. More...
 
struct  dft_processor_fftw_configuration
 Describes the specific FFTW DFT parameters. More...
 
class  dft_processor_fftw_impl
 Describes a DFT processor class configuration based on the FFTW library. More...
 
class  dft_processor_generic_impl
 Describes a DFT processor class configuration based on the FFTW library. More...
 
struct  dl_broadcast_allocation
 See ORAN WG8, 9.2.3.3.12 - Downlink Broadcast Allocation. More...
 
struct  dl_buffer_state_indication_message
 DL buffer state for a given RLC bearer. More...
 
struct  dl_config_common
 Downlink Configuration, common to the serving cell. More...
 
class  dl_harq_process
 
class  dl_logical_channel_manager
 
struct  dl_mac_ce_indication
 
struct  dl_msg_alloc
 Dedicated DL Grant for UEs. More...
 
struct  dl_msg_lc_info
 
struct  dl_msg_tb_info
 
struct  dl_paging_allocation
 Stores the information associated with Paging allocation. More...
 
class  dl_sch_pdu
 This class represents and encodes a MAC DL-SCH PDU that may contain multiple subPDUs. Each subPDU is composed of a MAC subheader and MAC CE or MAC SDU payload. More...
 
class  dl_sch_pdu_assembler
 Class that manages the encoding of DL-SCH MAC PDUs that will be stored in Transport Blocks. More...
 
struct  dl_sched_result
 
struct  dl_ssb_pdu
 Describes all the parameters related to an SSB allocation. More...
 
struct  dlsch_configuration
 Collects the necessary parameters to calculate the Downlink Shared Channel (DL-SCH) information. More...
 
struct  dlsch_information
 Collects Downlink Shared Channel (DL-SCH) derived parameters. More...
 
class  dlt_pcap
 Interface class for writing a DLT PCAP to a file. More...
 
class  dlt_pcap_impl
 
struct  dmrs_downlink_config
 
struct  dmrs_information
 
class  dmrs_pbch_processor
 Describes a DMRS for PBCH processor interface. More...
 
class  dmrs_pbch_processor_factory
 
class  dmrs_pbch_processor_impl
 
class  dmrs_pdcch_processor
 Describes a DMRS for PDCCH processor interface. More...
 
class  dmrs_pdcch_processor_factory
 
class  dmrs_pdcch_processor_impl
 Describes a generic implementation of a DMRS for PDCCH processor. More...
 
class  dmrs_pdsch_processor
 Describes a DMRS for PDSCH processor interface. More...
 
class  dmrs_pdsch_processor_factory
 
class  dmrs_pdsch_processor_impl
 Defines a DMRS for PDSCH generic implementation. More...
 
class  dmrs_pucch_estimator_factory
 
class  dmrs_pucch_processor
 Describes a DM-RS for PUCCH processor interface. More...
 
class  dmrs_pucch_processor_format1_impl
 Generic implementation of a DM-RS channel estimator for PUCCH Format 1. More...
 
class  dmrs_pucch_processor_format2_impl
 Generic implementation of a DM-RS channel estimator for PUCCH Format 2. More...
 
class  dmrs_pusch_estimator
 DM-RS-based PUSCH channel estimator interface. More...
 
class  dmrs_pusch_estimator_factory
 
class  dmrs_pusch_estimator_impl
 
class  dmrs_type
 Defines the DMRS for PDSCH and PUSCH types. More...
 
struct  dmrs_uplink_config
 
class  downlink_pdu_validator
 Downlink processor validation interface. More...
 
struct  downlink_preemption
 UE configuration to monitor PDCCH for INT_RNTI (interruption). More...
 
class  downlink_processor
 Downlink processor class that groups and process all the downlink channels within a slot. More...
 
class  downlink_processor_baseband
 Lower physical layer downlink processor - Baseband interface. More...
 
struct  downlink_processor_baseband_configuration
 Collects downlink processor baseband configuration parameters. More...
 
class  downlink_processor_baseband_impl
 Implements a software generic lower PHY downlink baseband processor. More...
 
struct  downlink_processor_config
 Configuration parameters for downlink processors. More...
 
struct  downlink_processor_configuration
 Describes a sector configuration. More...
 
class  downlink_processor_factory
 Factory that allows to create downlink processors. More...
 
struct  downlink_processor_factory_hw_config
 Downlink processor hardware-accelerated factory configuration. More...
 
struct  downlink_processor_factory_sw_config
 Downlink processor software factory configuration. More...
 
class  downlink_processor_impl
 Implements a software generic lower PHY downlink processor. More...
 
class  downlink_processor_notifier
 Lower physical layer downlink processor - Notifier interface. More...
 
class  downlink_processor_pool
 Pool to access a downlink processor. More...
 
struct  downlink_processor_pool_config
 Describes all downlink processors in a pool. More...
 
class  downlink_processor_pool_impl
 Implementation of a downlink processor pool. More...
 
struct  downlink_processor_pool_impl_config
 Describes all downlink processors in a pool. More...
 
class  downlink_processor_single_executor_impl
 Implementation of a downlink processor. More...
 
class  downlink_processor_single_executor_state
 Downlink processor state management class. More...
 
class  downlink_processor_validator_impl
 Implements the downlink PDU validator for downlink_processor_single_executor_impl. More...
 
class  du
 
struct  du_cell_config
 
struct  du_config
 
class  du_configurator
 
class  du_high
 Interface to DU-high class, which owns and manages the interaction between MAC, RLC and F1 layers. More...
 
class  du_high_cell_executor_mapper
 This interface is used to allow the DU to choose between different cell-specific task executors. More...
 
class  du_high_executor_mapper
 Interface used to access different executors used in the DU-High. More...
 
class  du_high_executor_mapper_impl
 Task Executor Mapper for DU-high. More...
 
class  du_high_ue_executor_mapper
 This interface is used to allow the DU to choose between different UE-specific task executors. More...
 
class  du_impl
 
struct  du_low_configuration
 Parameters used to instantiate the DU-low. More...
 
class  du_low_impl
 
struct  du_mac_sched_control_config
 
struct  du_mac_sched_control_config_response
 
class  du_procedure_logger
 
struct  du_qos_config
 QoS Configuration, i.e. 5QI and the associated RLC configuration for DRBs. More...
 
struct  du_srb_config
 SRB Configuration, i.e. associated RLC and MAC configuration for SRBs in the DU. More...
 
struct  dyn_5qi_descriptor_t
 
class  dynamic_bit_buffer
 Implements a bit buffer that uses dynamic memory. More...
 
class  dynamic_re_buffer
 Implements a dynamic resource element buffer. More...
 
class  dynamic_re_measurement
 Dynamic container for RE measurements. More...
 
class  dynamic_tensor
 Dynamic tensor - the dimensions can be resized dynamically. More...
 
class  e1ap_asn1_packer
 
struct  e1ap_cell_group_info_item
 
struct  e1ap_crit_diagnostics
 
struct  e1ap_crit_diagnostics_item
 
struct  e1ap_data_forwarding_info
 
struct  e1ap_data_forwarding_info_request
 
struct  e1ap_drb_failed_item_ng_ran
 
struct  e1ap_drb_modified_item_ng_ran
 
struct  e1ap_drb_setup_item_ng_ran
 
struct  e1ap_drb_status_transfer
 
struct  e1ap_drb_to_modify_item_ng_ran
 
struct  e1ap_drb_to_setup_item_ng_ran
 
struct  e1ap_drb_to_setup_mod_item_ng_ran
 
class  e1ap_event_handler
 Interface used by E1AP to inform about events. More...
 
class  e1ap_gateway_local_connector
 Implementation of a CU-UP and CU-CP E1AP gateway for the case that the CU-UP and CU-CP are co-located. More...
 
struct  e1ap_gbr_qos_flow_info
 
struct  e1ap_message
 E1AP message transferred between a CU-CP and a CU-UP. More...
 
class  e1ap_message_handler
 This interface is used to push the received E1AP PDUs to the CU-CP or CU-UP. More...
 
class  e1ap_message_notifier
 This interface notifies the reception of new E1AP messages over the E1AP interface. More...
 
struct  e1ap_ng_ran_alloc_and_retention_prio
 
struct  e1ap_ng_ran_bearer_context_mod_request
 
struct  e1ap_pdcp_config
 
struct  e1ap_pdcp_count
 
struct  e1ap_pdcp_sn_status_info
 
struct  e1ap_pdu_session_res_to_modify_item
 
struct  e1ap_pdu_session_res_to_setup_item
 
struct  e1ap_pdu_session_resource_failed_item
 
struct  e1ap_pdu_session_resource_modified_item
 
struct  e1ap_pdu_session_resource_setup_modification_item
 
struct  e1ap_qos_flow_failed_item
 
struct  e1ap_qos_flow_item
 
struct  e1ap_qos_flow_level_qos_params
 
struct  e1ap_qos_flow_map_item
 
struct  e1ap_qos_flow_qos_param_item
 
struct  e1ap_rohc
 
struct  e1ap_rohc_params
 
struct  e1ap_security_algorithm
 
struct  e1ap_security_info
 
struct  e1ap_up_params_item
 
struct  e1ap_up_security_key
 
struct  e2_appconfig
 E2 Agent configuration. More...
 
class  e2_connection_client
 Interface used by the E2 Agent to establish a new connection with a RIC. More...
 
class  e2_connection_manager
 
class  e2_du_metrics_connector
 Class used to receive metrics reports from scheduler and sends them to the e2 interface. More...
 
class  e2_du_metrics_interface
 
class  e2_du_metrics_notifier
 
class  e2_entity
 Wrapper for the E2 interface that puts function calls into its own task executor. More...
 
class  e2_event_handler
 Interface used by E2 to inform about events. More...
 
class  e2_event_manager
 
class  e2_gateway_remote_connector
 Implementation of a E2 Agent and RIC gateway for the case of socket-based communication. More...
 
class  e2_impl
 
struct  e2_indication_message
 
class  e2_indication_procedure
 E2 INDICATION procedure will be used to send the measurement data to the RIC in response to the E2 SUBSCRIPTION REQUEST, It will execute periodically until the E2 SUBSCRIPTION DELETE REQUEST is received. More...
 
class  e2_interface
 Combined entry point for E2 handling. More...
 
struct  e2_message
 
class  e2_message_handler
 This interface is used to push E2 messages to the E2 interface. More...
 
class  e2_message_notifier
 This interface notifies the reception of new E2 messages over the E2 interface. More...
 
class  e2_metric_connector_manager
 Manages the E2 metric connectors of the app. More...
 
class  e2_ric_control_procedure
 
struct  e2_ric_control_request
 
struct  e2_ric_control_response
 
class  e2_setup_procedure
 
struct  e2_setup_request_message
 CU initiated E2 setup request. More...
 
struct  e2_setup_response_message
 Response to CU initiated E2 setup request. More...
 
struct  e2_subscribe_delete_request_message
 
struct  e2_subscribe_delete_response_message
 
struct  e2_subscribe_reponse_message
 
struct  e2_subscribe_request_message
 
class  e2_subscriber_mgmt
 
class  e2_subscription_delete_procedure
 
struct  e2_subscription_info_t
 Here we define a subscription struct. More...
 
class  e2_subscription_manager
 
class  e2_subscription_manager_impl
 
class  e2_subscription_proc
 
class  e2_subscription_setup_procedure
 
struct  e2_subscription_t
 
class  e2ap_asn1_packer
 This E2AP packer class is used to pack outgoing and unpack incoming E2 message in ASN1 format. More...
 
struct  e2ap_configuration
 E2AP configuration. More...
 
class  e2ap_network_adapter
 E2AP bridge that uses the IO broker to handle the SCTP connection. More...
 
class  e2ap_packer
 This interface is used to pack outgoing and unpack incoming E2 messages. More...
 
struct  e2sm_action_definition
 
class  e2sm_control_action_executor
 RIC control action executor maps an control action request to the proper stack functions. More...
 
class  e2sm_control_service
 
struct  e2sm_event_trigger_definition
 
class  e2sm_handler
 
class  e2sm_interface
 
class  e2sm_kpm_asn1_packer
 
class  e2sm_kpm_du_meas_provider_impl
 
class  e2sm_kpm_impl
 
class  e2sm_kpm_meas_provider
 
struct  e2sm_kpm_metric_t
 
class  e2sm_kpm_report_service_base
 
class  e2sm_kpm_report_service_style1
 
class  e2sm_kpm_report_service_style2
 
class  e2sm_kpm_report_service_style3
 
class  e2sm_kpm_report_service_style4
 
class  e2sm_kpm_report_service_style5
 
class  e2sm_manager
 
class  e2sm_rc_asn1_packer
 
class  e2sm_rc_control_action_2_6_du_executor
 
class  e2sm_rc_control_action_du_executor_base
 
class  e2sm_rc_control_service
 Class for e2sm_rc_control_service styles 1-10. More...
 
class  e2sm_rc_control_service_base
 
struct  e2sm_rc_control_service_def_t
 
class  e2sm_rc_control_service_style_255
 Class for e2sm_rc_control_service style 255 (Multiple actions) More...
 
class  e2sm_rc_impl
 
class  e2sm_report_service
 
struct  e2sm_ric_control_request
 
struct  e2sm_ric_control_response
 
class  eager_async_task
 
struct  ecef_coordinates_t
 
struct  epoch_time_t
 
class  epoll_handler
 < A virtual interface to handle epoll events (used by timer and socket handler) Callback function called when data is received on socket More...
 
class  epoll_receive_callback
 Callback function called when timer expires. More...
 
class  epoll_signal_handler
 
class  epoll_timer_handler
 Basic epoll signal handler. More...
 
class  event_receiver
 
class  event_receiver< void >
 
class  event_sender
 
class  event_sender< void >
 
class  event_signal
 Similar to "manual_event_flag", but the data passed to .set() is propagated to awaiting coroutine. More...
 
class  event_signal_flag
 Awaitable type that can be manually set to one of the states: "set" or "unset" Coroutines will automatically resume when they await on a manual_event_flag that is in "set" state. More...
 
class  evm_calculator
 Error Vector Magnitude calculator. More...
 
class  evm_calculator_generic_impl
 Generic software implementation of the EVM calculator interface. More...
 
class  executor_tracer
 A task executor that traces the latencies of the task enqueuing/dequeuing and task invocation. More...
 
class  executor_tracer< Exec, detail::null_event_tracer >
 Specialization for null event tracer. It should not add any overhead compared to the original executor. More...
 
class  expected
 
struct  expert_execution_appconfig
 Expert configuration of the gNB app. More...
 
struct  expert_threads_appconfig
 Expert threads configuration of the gNB app. More...
 
struct  expert_upper_phy_appconfig
 Expert upper physical layer configuration. More...
 
class  f1ap_asn1_packer
 
struct  f1ap_common_log_prefix
 
class  f1ap_event_handler
 Interface used by F1 to inform about events. More...
 
struct  f1ap_message
 F1AP message transferred between a CU-CP and a DU. More...
 
class  f1ap_message_handler
 This interface is used to push F1AP messages to the F1 interface. More...
 
class  f1ap_message_notifier
 This interface notifies the reception of new F1AP messages over the F1-C interface. More...
 
class  f1c_gateway_local_connector
 Implementation of a DU and CU-CP F1-C gateway for the case that the DU and CU-CP are co-located. More...
 
struct  f1u_cu_bearer
 
struct  f1u_cu_up_appconfig
 F1-U configuration at CU_UP side. More...
 
class  f1u_cu_up_entity
 
class  f1u_cu_up_gateway
 
class  f1u_cu_up_lower_transport_interface
 
class  f1u_cu_up_lower_transport_notifier
 
class  f1u_cu_up_rx_upper_data_notifier
 
class  f1u_cu_up_tx_upper_data_interface
 
class  f1u_cu_up_tx_upper_data_notifier
 
class  f1u_dl_local_adapter
 
struct  f1u_du_appconfig
 F1-U configuration at DU side. More...
 
struct  f1u_du_bearer
 
class  f1u_local_connector
 Object used to connect the DU and CU-UP F1-U bearers On the co-located case this is done by connecting both entities directly. More...
 
class  f1u_tx_delivery_local_adapter
 
class  f1u_ul_local_adapter
 
struct  fapi_configuration
 
class  fifo_async_task_scheduler
 Asynchronous task that sequentially runs other enqueued asynchronous tasks. More...
 
class  file_event_tracer
 Class that writes trace events to a dedicated trace file. More...
 
class  file_event_tracer< false >
 Specialization of file_event_tracer that does not write any events. More...
 
class  file_sink
 
class  file_tensor
 Binary file input interface for data with multiple dimensions. More...
 
class  file_vector
 Simple binary file input-output interface. More...
 
class  fixed_size_memory_block_pool
 
struct  freq_band_indicator
 Used to indicate a frequency band. More...
 
struct  frequency_info_dl
 This class provides basic parameters of a downlink carrier and transmission. More...
 
struct  frequency_info_ul
 
class  general_task_worker
 Single thread worker with a locking MPSC input task queue. This worker type is ideal for the cases where there is low contention between task producers. More...
 
class  general_task_worker_executor
 Executor for single-thread task worker. More...
 
class  generic_dft_N
 Generic interface of an N-point DFT calculator. More...
 
struct  gnb_appconfig
 Monolithic gnb application configuration. More...
 
class  gnb_console_helper
 Helper class to manager interaction with console, i.e. reading from stdin as well as writing to stdout to print traces. Class uses the IO broker to register callback handlers. When they are called they run in the context of the IO broker thread. More...
 
struct  gnb_os_sched_affinity_config
 CPU affinity configuration in the gNB app. More...
 
class  gnb_os_sched_affinity_manager
 Scheduler affinity mask manager. More...
 
struct  gnb_parsed_appconfig
 Monolithic gnb parsed application configuration. More...
 
struct  grant_info
 Parameters of a grant allocation in the cell resource grid. More...
 
struct  grant_prbs_mcs
 
struct  gtpu_allocator_creation_request
 
struct  gtpu_config
 Configurable parameters for the GTP-U. More...
 
class  gtpu_demux
 Combined entry point for the GTPU-demux object. More...
 
struct  gtpu_demux_cfg_t
 
struct  gtpu_demux_creation_request
 
class  gtpu_demux_ctrl
 This interface manages the TEID to GTP-U tunnel mapping. More...
 
class  gtpu_demux_impl
 
class  gtpu_demux_rx_upper_layer_interface
 This interface is used to push incoming GTP-U messages to the demuxer. More...
 
struct  gtpu_dissected_pdu
 
class  gtpu_echo
 
struct  gtpu_echo_creation_message
 
class  gtpu_echo_impl
 Implementation of the GTP-U path management entity, i.e. echo request/response, supported extension headers notif. More...
 
class  gtpu_echo_rx
 Class used for reception of GTP-U path management messages. More...
 
class  gtpu_echo_tx
 Class used for transmission of GTP-U path management messages. More...
 
class  gtpu_echo_tx_interface
 
struct  gtpu_extension_header
 Base class for GTP-U extension headers. More...
 
struct  gtpu_header
 GTP-U header, including extensions. More...
 
struct  gtpu_ie_private_extension
 
struct  gtpu_ie_recovery
 
struct  gtpu_rx_sdu_info
 
struct  gtpu_rx_state
 GTP-U RX state variables. More...
 
struct  gtpu_teid_compare_t
 
struct  gtpu_teid_hasher_t
 
class  gtpu_teid_pool
 GTP-U TEID pool. More...
 
class  gtpu_teid_pool_impl
 
struct  gtpu_teid_tag
 GTP-U Tunnel Identifier. More...
 
class  gtpu_tunnel_base_rx
 Class used for receiving GTP-U bearers. More...
 
class  gtpu_tunnel_base_tx
 Class used for transmitting GTP-U bearers. More...
 
class  gtpu_tunnel_log_prefix
 
class  gtpu_tunnel_ngu
 
struct  gtpu_tunnel_ngu_creation_message
 
class  gtpu_tunnel_ngu_impl
 
class  gtpu_tunnel_ngu_rx
 Class used for receiving GTP-U bearers. More...
 
class  gtpu_tunnel_ngu_rx_lower_layer_notifier
 
class  gtpu_tunnel_ngu_tx
 Class used for transmitting GTP-U bearers. More...
 
class  gtpu_tunnel_rx_upper_layer_interface
 
class  gtpu_tunnel_tx_lower_layer_interface
 
class  gtpu_tunnel_tx_upper_layer_notifier
 
struct  hal_appconfig
 HAL configuration of the gNB app. More...
 
class  harq_entity
 
class  harq_logger
 Helper class to log HARQ events. More...
 
class  harq_timeout_handler
 Handler of HARQ process timeouts. More...
 
class  heap_memory_resource
 
struct  in_place_t
 Tag to disambiguate optional ctor overloads. Introduced only in C++17. More...
 
class  index_based_ue_executor_mapper
 L2 UL executor mapper that maps UEs based on their RNTI. More...
 
struct  instant_trace_event
 Trace event type with defined name, starting point but no duration. More...
 
class  interpolator
 Interpolator interface. More...
 
class  interpolator_linear_impl
 Linear interpolator. More...
 
class  interval
 Representation of an interval between two numeric-types with the math representation [start, stop). More...
 
class  intrusive_double_linked_list
 
struct  intrusive_double_linked_list_element
 
class  intrusive_forward_list
 
struct  intrusive_forward_list_element
 
class  io_broker
 Describes the base interface for an (async) IO broker. The IO broker is responsible for handling all IO events, including sockets, signals, and system timers. File descriptors can be registered with the IO broker via register_fd() and unregistered via unregister_fd(). More...
 
struct  io_broker_config
 
class  io_broker_epoll
 Implementation of an IO broker using epoll. More...
 
struct  is_complex
 Checks if T is compatible with a complex floating point. More...
 
struct  is_complex< const std::complex< T > >
 
struct  is_complex< std::complex< T > >
 
struct  lazy_task_launcher
 
struct  lazy_task_launcher< void >
 
struct  lcg_bsr_report
 UL BSR Report for a single Logical Channel Group. More...
 
class  lcid_dl_sch_t
 LCID representation for PDSCH. More...
 
class  lcid_ul_sch_t
 
class  ldpc_decoder
 LDPC decoder interface. More...
 
class  ldpc_decoder_avx2
 LDPC decoder implementation based on AVX2 intrinsics. More...
 
class  ldpc_decoder_avx512
 LDPC decoder implementation based on AVX512 intrinsics. More...
 
class  ldpc_decoder_factory
 
class  ldpc_decoder_generic
 Generic LDPC decoder implementation without any optimization. More...
 
class  ldpc_decoder_impl
 Template LDPC decoder. More...
 
class  ldpc_decoder_neon
 LDPC decoder implementation based on NEON intrinsics. More...
 
class  ldpc_encoder
 LDPC encoder interface. More...
 
class  ldpc_encoder_avx2
 LDPC encoder implementation based on AVX2 intrinsics. More...
 
class  ldpc_encoder_factory
 
class  ldpc_encoder_generic
 Generic LDPC encoder implementation without any optimization. More...
 
class  ldpc_encoder_impl
 Template LDPC encoder. More...
 
class  ldpc_encoder_neon
 LDPC encoder implementation based on NEON intrinsics. More...
 
class  ldpc_graph_impl
 Describes the Tanner graph of an LDPC code (implementation). More...
 
class  ldpc_rate_dematcher
 LDPC rate dematcher interface. It reverts the operations of ldpc_rate_matcher. More...
 
class  ldpc_rate_dematcher_avx2_impl
 
class  ldpc_rate_dematcher_avx512_impl
 
class  ldpc_rate_dematcher_factory
 
class  ldpc_rate_dematcher_impl
 LDPC rate dematching implementation. More...
 
class  ldpc_rate_dematcher_neon_impl
 
class  ldpc_rate_matcher
 LDPC rate matching (i.e., bit selection and bit interleaving) interface. More...
 
class  ldpc_rate_matcher_factory
 
class  ldpc_rate_matcher_impl
 LDPC rate matching implementation, as per TS38.212 Section 5.4.2. More...
 
class  ldpc_segmenter_impl
 Generic implementation of LDPC segmentation. More...
 
class  ldpc_segmenter_rx
 Carries out the segmentation of a codeword into a number of codeblocks. More...
 
class  ldpc_segmenter_rx_factory
 
class  ldpc_segmenter_tx
 Carries out the segmentation of a transport block into a number of codeblocks. More...
 
class  ldpc_segmenter_tx_factory
 
struct  log_appconfig
 Configuration of logging functionalities. More...
 
class  log_likelihood_ratio
 Represents log-likelihood ratio (LLR) values. More...
 
class  log_sink_message_spy
 
class  log_sink_spy
 This custom sink intercepts log messages to count error and warning log entries. More...
 
class  logger_event_tracer
 Class that repurposes a log channel to write trace events. More...
 
class  logger_event_tracer< false >
 
class  logging_pusch_processor_decorator
 
struct  logical_channel_config
 LogicalChannelConfig, TS 38.331. More...
 
struct  long_bsr_report
 
class  low_papr_sequence_collection
 Describes a low PAPR sequence collection as per TS38.211 Section 5.2.2. More...
 
class  low_papr_sequence_collection_factory
 
class  low_papr_sequence_collection_impl
 Pre-generates and collects low PAPR sequences. More...
 
class  low_papr_sequence_generator
 Describes a low PAPR sequence generator interface that implements TS38.211 Section 5.2.2 for any possible length. More...
 
class  low_papr_sequence_generator_factory
 
class  low_papr_sequence_generator_impl
 Describes a generic low PAPR sequence generation implementation. More...
 
class  lower_phy
 Lower PHY main interface. More...
 
class  lower_phy_baseband_processor
 Implements the lower physical layer baseband processing core. More...
 
struct  lower_phy_configuration
 Lower physical layer configuration. More...
 
class  lower_phy_controller
 Lower physical layer - control interface. More...
 
class  lower_phy_downlink_processor
 Downlink processor main interface. More...
 
class  lower_phy_downlink_processor_factory
 Lower physical layer downlink processor - Factory interface. More...
 
class  lower_phy_error_notifier
 Lower physical layer interface used to notify miscellaneous types of error events. More...
 
class  lower_phy_factory
 Lower physical layer factory. More...
 
class  lower_phy_impl
 Lower physical layer implementation. More...
 
class  lower_phy_request_handler
 Describes the lower physical layer request handler. More...
 
class  lower_phy_rg_handler
 Lower physical layer resource grid handler interface. More...
 
struct  lower_phy_rx_symbol_context
 Describes the context of a newly received symbol. More...
 
class  lower_phy_rx_symbol_notifier
 Lower physical layer notifier for events related to received symbols. More...
 
struct  lower_phy_sector_description
 Describes a sector configuration. More...
 
struct  lower_phy_threads_appconfig
 Lower PHY thread configuration fo the gNB. More...
 
struct  lower_phy_timing_context
 Describes the context of the current timing boundary. More...
 
class  lower_phy_timing_notifier
 Lower physical layer interface to notify timing related events. More...
 
class  lower_phy_uplink_processor
 Uplink processor main interface. More...
 
class  lower_phy_uplink_processor_factory
 Lower physical layer uplink processor - Factory interface. More...
 
class  lower_phy_uplink_processor_impl
 Implements a software generic lower PHY uplink processor. More...
 
struct  mac_bsr_appconfig
 MAC Buffer Status Report application configuration. More...
 
struct  mac_bsr_ce_info
 Information and context relative to a decoded MAC CE BSR. More...
 
struct  mac_ce_scheduling_command
 Command used by MAC to trigger the scheduling of a DL MAC CE for a UE. More...
 
class  mac_cell_control_information_handler
 Interface to handle feedback information from the PHY. More...
 
class  mac_cell_controller
 Interface used to handle a MAC cell activation/deactivation. More...
 
struct  mac_cell_creation_request
 
struct  mac_cell_group_appconfig
 
struct  mac_cell_group_config
 MAC-CellGroupConfig, TS 38.331. More...
 
struct  mac_cell_group_params
 Parameters that are used to initialize or build the MAC-CellGroupConfig, TS 38.331. More...
 
class  mac_cell_manager
 Class used to setup the MAC cells and slices. More...
 
class  mac_cell_processor
 
class  mac_cell_rach_handler
 Interface used to handle RACH indications specific to a cell. More...
 
class  mac_cell_result_notifier
 
class  mac_cell_slot_handler
 Interface used to handle slot indications specific to a cell. More...
 
struct  mac_cell_start
 Start configured cell. More...
 
struct  mac_config
 Configuration passed to MAC during its instantiation. More...
 
struct  mac_control_config
 
class  mac_controller
 
struct  mac_crc_indication_message
 List of Uplink CRC indications for a given slot. More...
 
struct  mac_crc_pdu
 CRC indication for a given PDU. More...
 
struct  mac_csi_rs_precoding_info
 
class  mac_ctrl_configurator
 
struct  mac_dl_buffer_state_indication_message
 DL Buffer state for a given RLC bearer. More...
 
struct  mac_dl_config
 
class  mac_dl_configurator
 
struct  mac_dl_data_result
 List of DL PDUs produced by MAC in a given slot and cell. More...
 
class  mac_dl_processor
 
struct  mac_dl_sched_result
 DL Scheduling Request generated by the MAC and received by the PHY. More...
 
class  mac_dl_ue_context
 Context of a UE in the MAC DL. More...
 
class  mac_dl_ue_manager
 Repository of UE MAC DL contexts. More...
 
struct  mac_expert_config
 Implementation-specific parameters used to tune MAC operation. More...
 
class  mac_impl
 
class  mac_interface
 
struct  mac_lc_appconfig
 
struct  mac_lc_config
 Configurations for MAC logical channel parameters. More...
 
struct  mac_log_prefix
 
struct  mac_logical_channel_config
 Parameters passed to MAC concerning a created logical channel. More...
 
struct  mac_nr_context_info
 
class  mac_paging_information_handler
 Interface to handle paging information from the CU-CP. More...
 
class  mac_pcap
 Interface class for writing a MAC PCAP to a file. More...
 
class  mac_pcap_impl
 
struct  mac_pdcch_precoding_info
 
struct  mac_pdsch_precoding_info
 MAC PDSCH precoding information. More...
 
class  mac_pdu_handler
 Interface used to push Rx Data indications to L2. More...
 
struct  mac_phr_appconfig
 MAC Power Headroom Reporting configuration. More...
 
struct  mac_phr_ce_info
 Information and context relative to a decoded MAC CE PHR. More...
 
struct  mac_rach_indication
 
class  mac_result_notifier
 
struct  mac_rx_data_indication
 Rx_Data.indication Message. More...
 
struct  mac_rx_pdu
 MAC Received PDU that comprises the list of PDUs of Rx_Data.indication. More...
 
class  mac_scheduler
 
class  mac_scheduler_adapter
 Interface from MAC to a scheduler implementation. More...
 
class  mac_scheduler_ce_info_handler
 Interface between MAC and scheduler that is used by MAC to forward MAC CE information and force UL grants. More...
 
class  mac_scheduler_cell_info_handler
 Interface used by MAC Cell Processor to interact with the MAC scheduler. More...
 
class  mac_scheduler_configurator
 Adapter interface between MAC and scheduler that allows the srsGNB MAC to configure different scheduler implementations. Note: This adapter interface makes scheduler configuration methods awaitable. More...
 
class  mac_sdu_rx_notifier
 This interface notifies to upper layers the reception of new SDUs over a logical channel. More...
 
class  mac_sdu_tx_builder
 This interface represents the entry point of a logical channel in the MAC layer. More...
 
struct  mac_slice_configuration
 Network slice configuration. More...
 
struct  mac_sr_appconfig
 MAC Scheduler Request configuration. More...
 
struct  mac_ssb_precoding_info
 
class  mac_test_mode_adapter
 
class  mac_test_mode_cell_adapter
 Adapter of MAC cell for testing purposes. It automatically forces ACK/CRC=OK for the test UE. More...
 
struct  mac_uci_indication_message
 UCI indication that may contain multiple UCI PDUs. More...
 
struct  mac_uci_pdu
 UCI indication for a given PDU. More...
 
class  mac_ue_configurator
 Interface used to manage the creation, reconfiguration and deletion of UEs in MAC. More...
 
struct  mac_ue_context
 
class  mac_ue_control_information_handler
 
struct  mac_ue_create_request
 Input parameters used to create a UE in the scheduler. More...
 
class  mac_ue_create_request_procedure
 
struct  mac_ue_create_response
 Outcome of a MAC UE creation request procedure. More...
 
class  mac_ue_delete_procedure
 
struct  mac_ue_delete_request
 Input parameters used to delete a UE in the scheduler. More...
 
struct  mac_ue_delete_response
 Outcome of a MAC UE deletion request procedure. More...
 
class  mac_ue_radio_link_notifier
 Interface used to notify detected radio link failures in the MAC (e.g. due to max KOs reached) for a given UE. More...
 
class  mac_ue_reconfiguration_procedure
 
struct  mac_ue_reconfiguration_request
 Input parameters used to reconfigure a UE in the scheduler. More...
 
struct  mac_ue_reconfiguration_response
 Outcome of a MAC UE reconfiguration request procedure. More...
 
class  mac_ul_ccch_notifier
 Methods used by MAC to notify events. More...
 
struct  mac_ul_config
 
class  mac_ul_configurator
 
class  mac_ul_processor
 
class  mac_ul_sch_pdu
 
class  mac_ul_sch_subpdu
 
struct  mac_ul_sched_result
 
struct  mac_ul_scheduling_command
 Command used by MAC to force the scheduling of an UL grant for a UE in the scheduler. More...
 
class  mac_ul_ue_context
 Stores MAC UL UE context. In particular, the UL PDU notifiers for each logical channel. More...
 
class  mac_ul_ue_manager
 
class  manual_event
 Awaitable type that can be manually set to one of the states: More...
 
class  manual_event< void >
 Specialization of manual_event<Data> for the case that the Data is void. More...
 
class  manual_task_worker
 Task worker that implements the executor interface and requires manual calls to run pending deferred tasks. Useful for unit testing. More...
 
struct  metrics_appconfig
 Metrics report configuration. More...
 
class  metrics_hub
 
class  metrics_hub_source
 This class is used to create a source object in the metrics hub to which one or more subscribers can be connected. More...
 
class  metrics_plotter_json
 Class used to receive metrics reports from scheduler and format them into a JSON file. More...
 
class  metrics_plotter_stdout
 Class used to receive metrics reports from scheduler and pretty-print them to the console. More...
 
struct  mobility_appconfig
 All mobility related configuration parameters. More...
 
class  modulation_mapper
 Modulation mapper public interface. More...
 
class  modulation_mapper_impl
 Modulation mapper based on look-up tables. More...
 
struct  moveonly_test_object
 Test object to verify correct move ctor/assignment logic. More...
 
class  network_gateway_controller
 Interface to control common parameters to all network gateways, such as create(), bind(), etc. Gateway specializations should add specific methods as required. More...
 
class  network_gateway_data_notifier
 Interface to inform upper layers about reception of new PDUs. More...
 
class  network_gateway_data_notifier_with_src_addr
 Interface to inform upper layers about reception of new PDUs and source address. More...
 
struct  ng_ran_qos_support_item_t
 
struct  no_fail_response_path
 
class  non_blocking_enqueuer
 Static interface used to push elements to a concurrent_queue. More...
 
struct  non_dyn_5qi_descriptor_t
 
struct  non_rt_threads_appconfig
 Non real time thread configuration for the gNB. More...
 
struct  nondefault_ctor_test_object
 
struct  noop_coroutine_promise
 Coroutine whose resumption does nothing. More...
 
struct  nr_cell_global_id_t
 The NR Cell Global Identity (NR-CGI) More...
 
struct  nr_cgi_support_item_t
 
struct  nr_multi_band_info
 
struct  nr_ns_p_max_value
 
struct  nr_up_dl_message
 NR user plane protocol downlink message as described in TS 38.425. More...
 
struct  nr_up_ul_message
 NR user plane protocol uplink message as described in TS 38.425. More...
 
struct  nru_assistance_information
 
struct  nru_dl_data_delivery_status
 
struct  nru_dl_message
 NR-U DL message exchanged from node holding a PDCP entity (CU-UP) to the peer node (DU). More...
 
struct  nru_dl_user_data
 
struct  nru_lost_nru_sn_range
 
struct  nru_pdcp_sn_discard_block
 
struct  nru_ul_message
 NR-U UL message exchanged from node the peer node (DU) to the node holding a PDCP entity (CU-UP). More...
 
struct  ntn_config
 
class  null_dlt_pcap
 Null sink for DLT pcap messages. This is useful in unit tests and when the application disables pcaps. More...
 
class  null_mac_pcap
 Null sink for MAC pcap messages. This is useful in unit tests and when the application disables pcaps. More...
 
class  null_rlc_pcap
 Dummy implementation RLC PCAP for testing. More...
 
struct  nullopt_t
 Empty class type to represent empty optional objects. More...
 
class  nzp_csi_rs_configuration_validator
 Describes the NZP-CSI-RS generator configuration validator interface. More...
 
class  nzp_csi_rs_configuration_validator_impl
 Implements a parameter validator for nzp_csi_rs_generator_impl. More...
 
class  nzp_csi_rs_generator
 
class  nzp_csi_rs_generator_factory
 
class  nzp_csi_rs_generator_impl
 Defines a NZP-CSI-RS signal generator. More...
 
class  nzp_csi_rs_generator_pool
 Concurrent NZP-CSI-RS generator pool. More...
 
struct  nzp_csi_rs_resource
 NZP-CSI-RS-Resource is used to configure Non-Zero-Power (NZP) CSI-RS transmitted in the cell. More...
 
struct  nzp_csi_rs_resource_set
 
struct  obj_id_comparator
 Creates an functor that applies operator< comparison between objects based on their id. More...
 
struct  ofdm_demodulator_common_configuration
 OFDM demodulator factory configuration. Provides the necessary dependency instances. More...
 
struct  ofdm_demodulator_configuration
 Setup configuration parameters. More...
 
class  ofdm_demodulator_factory
 Describes an OFDM demodulator factory. More...
 
struct  ofdm_factory_generic_configuration
 Describes the necessary parameters for creating generic OFDM modulator and demodulator factories. More...
 
struct  ofdm_modulator_common_configuration
 OFDM modulator factory configuration. Provides the necessary dependency instances. More...
 
struct  ofdm_modulator_configuration
 Setup configuration parameters. More...
 
class  ofdm_modulator_factory
 Describes an OFDM modulator factory. More...
 
class  ofdm_prach_demodulator
 OFDM PRACH demodulator. More...
 
class  ofdm_prach_demodulator_factory
 OFDM PRACH demodulator factory. More...
 
class  ofdm_prach_demodulator_impl
 Describes a generic OFDM PRACH demodulator. More...
 
class  ofdm_slot_demodulator
 Describes an OFDM demodulator with slot granularity. More...
 
class  ofdm_slot_demodulator_impl
 Describes a generic OFDM slot demodulator. More...
 
class  ofdm_slot_modulator
 Describes an OFDM modulator with slot granularity. More...
 
class  ofdm_slot_modulator_impl
 Describes a generic OFDM slot modulator. More...
 
class  ofdm_symbol_demodulator
 Describes an OFDM demodulator that demodulates at symbol granularity. More...
 
class  ofdm_symbol_demodulator_impl
 Describes a generic OFDM symbol demodulator. More...
 
class  ofdm_symbol_modulator
 Describes an OFDM modulator that modulates at symbol granularity. More...
 
class  ofdm_symbol_modulator_impl
 Describes a generic OFDM symbol modulator. More...
 
struct  ofdm_symbol_range
 Range [start,stop) of OFDM symbols. More...
 
struct  ofh_threads_appconfig
 Open Fronthaul thread configuration for the gNB. More...
 
class  olla_algorithm
 Outer-layer Link Adaptation (OLLA) algorithm, which modifies SNR thresholds used in the selection of MCS to achieve a specified target BLER. More...
 
class  optional
 Optional objects. More...
 
struct  orbital_coordinates_t
 
struct  os_sched_affinity_bitmask
 CPU affinity bitmap. More...
 
class  os_thread_realtime_priority
 
struct  os_thread_realtime_priority_tag
 
struct  packet_error_rate_t
 
struct  paging_appconfig
 Paging related configuration. See TS 38.331, PCCH-Config. More...
 
struct  paging_information
 
class  paging_pdu_assembler
 Encodes Paging PDUs based on Paging information provided by the scheduler. More...
 
class  paging_scheduler
 Defines Paging scheduler that is used to allocate resources to send paging information to UE in a given slot. More...
 
struct  paging_ue_info
 
class  pbch_encoder
 Describes the PBCH encoder interface. More...
 
class  pbch_encoder_factory
 
class  pbch_encoder_impl
 
class  pbch_modulator
 Describes a PBCH modulator interface. More...
 
class  pbch_modulator_factory
 
class  pbch_modulator_impl
 
struct  pcap_appconfig
 
class  pcap_file_writer
 Base class for PCAP writing to files. The class in not thread-safe. Proper protection from multiple threads needs to be implemented by the user of the class. More...
 
struct  pcap_hdr_t
 This structure gets written to the start of the file. More...
 
class  pcap_pdu_data
 
struct  pcap_rlc_pdu_context
 Context information for every RLC NR PDU that will be logged. More...
 
struct  pcaprec_hdr_t
 This structure precedes each packet. More...
 
struct  pcch_config
 Used to paging related configuration. More...
 
class  pcell_ue_executor_mapper
 L2 UL executor mapper that maps UEs based on their PCell. More...
 
struct  pdcch_appconfig
 PDCCH application configuration. More...
 
struct  pdcch_candidates_common_ss_configuration
 
struct  pdcch_candidates_ue_ss_configuration
 
struct  pdcch_common_appconfig
 PDCCH Common configuration. More...
 
struct  pdcch_config
 "PDCCH-Config" - UE-dedicated PDCCH configuration as per TS 38.331. More...
 
struct  pdcch_config_common
 
class  pdcch_context
 PDCCH transmission context. More...
 
struct  pdcch_dedicated_appconfig
 PDCCH Dedicated configuration. More...
 
struct  pdcch_dl_information
 PDCCH DL allocation. More...
 
class  pdcch_encoder
 Describes the PDCCH encoder interface. More...
 
class  pdcch_encoder_factory
 
class  pdcch_encoder_impl
 PDCCH encoder, as per TS38.212 Section 7.3. More...
 
class  pdcch_modulator
 Describes a PDCCH modulator interface. More...
 
class  pdcch_modulator_factory
 
class  pdcch_modulator_impl
 
class  pdcch_pdu_validator
 Describes the PDCCH processor validator interface. More...
 
struct  pdcch_precoding_info
 The precoding information associated with PDCCH PDUs. More...
 
class  pdcch_processor
 Describes the PDCCH processor interface. More...
 
struct  pdcch_processor_config_t
 Describes the PDCCH processor generic implementation constructor configuration. More...
 
class  pdcch_processor_factory
 
class  pdcch_processor_impl
 Describes a generic PDCCH processor. More...
 
class  pdcch_processor_pool
 Concurrent PDCCH processor pool. More...
 
class  pdcch_processor_validator_impl
 Implements a parameter validator for pdcch_processor_impl. More...
 
class  pdcch_resource_allocator
 PDCCH resource allocation algorithm for a single cell and for both common and UE-dedicated CORESETs. More...
 
class  pdcch_resource_allocator_impl
 
class  pdcch_slot_allocator
 
struct  pdcch_type0_css_coreset_description
 Describes the CORESET for Type0-PDCCH CSS. More...
 
struct  pdcch_type0_css_occasion_pattern1_configuration
 Describes a Type0-PDCCH CSS monitoring occasion configuration parameters for pattern 1. More...
 
struct  pdcch_type0_css_occasion_pattern1_description
 Describes a Type0-PDCCH CSS monitoring occasions for pattern 1. More...
 
struct  pdcch_ul_information
 PDCCH UL allocation. More...
 
struct  pdcp_appconfig
 
class  pdcp_bearer_log_prefix
 
struct  pdcp_config
 Configurable parameters for PDCP. More...
 
struct  pdcp_config_common
 Configurable parameters for PDCP that are common for both TX and RX. More...
 
struct  pdcp_control_pdu_header
 
struct  pdcp_custom_config
 Non-standard configurable parameters for PDCP. More...
 
struct  pdcp_custom_config_base
 
struct  pdcp_custom_config_rx
 
struct  pdcp_custom_config_tx
 
struct  pdcp_data_pdu_header
 
class  pdcp_entity
 
struct  pdcp_entity_creation_message
 
class  pdcp_entity_impl
 
class  pdcp_entity_rx
 
class  pdcp_entity_tx
 
class  pdcp_entity_tx_rx_base
 
struct  pdcp_max_count
 
struct  pdcp_metrics_container
 
struct  pdcp_rx_appconfig
 
struct  pdcp_rx_config
 
class  pdcp_rx_lower_interface
 
class  pdcp_rx_metrics
 
struct  pdcp_rx_metrics_container
 This struct will hold relevant metrics for the PDCP RX. More...
 
class  pdcp_rx_metrics_interface
 
struct  pdcp_rx_sdu_info
 
struct  pdcp_rx_state
 
class  pdcp_rx_status_provider
 
class  pdcp_rx_upper_control_interface
 
class  pdcp_rx_upper_control_notifier
 
class  pdcp_rx_upper_data_notifier
 
struct  pdcp_tx_appconfig
 
struct  pdcp_tx_config
 
class  pdcp_tx_lower_interface
 
class  pdcp_tx_lower_notifier
 
class  pdcp_tx_metrics
 
struct  pdcp_tx_metrics_container
 This struct will hold relevant metrics for the PDCP TX. More...
 
class  pdcp_tx_metrics_interface
 
struct  pdcp_tx_pdu
 
struct  pdcp_tx_state
 
class  pdcp_tx_status_handler
 
class  pdcp_tx_upper_control_interface
 
class  pdcp_tx_upper_control_notifier
 
class  pdcp_tx_upper_data_interface
 
struct  pdsch_antenna_ports_mapping
 Antenna ports mapping information for PDSCH when using DCI format 1_1. See TS 38.212 Tables 7.3.1.2.2-1/2/3/4. More...
 
struct  pdsch_appconfig
 PDSCH application configuration. More...
 
class  pdsch_block_processor
 Internal PDSCH subprocessor. More...
 
struct  pdsch_code_block_group_transmission
 PDSCH-CodeBlockGroupTransmission, as per TS38.331. More...
 
class  pdsch_codeblock_processor
 PDSCH codeblock processor. More...
 
struct  pdsch_codeword
 PDSCH codeword. More...
 
struct  pdsch_config
 "PDSCH-Config" - UE-dedicated PDSCH Configuration as per TS38.331. More...
 
struct  pdsch_config_common
 
struct  pdsch_config_params
 
class  pdsch_context
 PDSCH transmission context. More...
 
struct  pdsch_default_time_allocation_config
 Collects the PDSCH default time-domain allocation parameters. More...
 
struct  pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration
 Collects the necessary parameters to calculate the DMRS symbol mask for a TypeA PDSCH mapping and single duration DMRS. More...
 
class  pdsch_encoder
 PDSCH encoder, as per TS38.212 Section 7.2. More...
 
class  pdsch_encoder_factory
 
struct  pdsch_encoder_factory_hw_configuration
 HW-accelerated PDSCH encoder factory configuration parameters. More...
 
struct  pdsch_encoder_factory_sw_configuration
 
class  pdsch_encoder_hw_impl
 Generic hardware-accelerated implementation of the PDSCH encoder. More...
 
class  pdsch_encoder_impl
 Generic implementation of the PDSCH encoder. More...
 
struct  pdsch_information
 Information relative to a PDSCH grant in a given slot. More...
 
class  pdsch_modulator
 Describes a PDSCH modulator interface. More...
 
class  pdsch_modulator_factory
 
class  pdsch_modulator_impl
 Describes a generic implementation of a PDSCH modulator, defined by TS 38.211 section 7.3.1. More...
 
class  pdsch_pdu_validator
 Describes the PDSCH processor validator interface. More...
 
struct  pdsch_precoding_info
 The precoding information associated with PDSCH PDUs. More...
 
class  pdsch_processor
 Describes the PDSCH processor interface. More...
 
struct  pdsch_processor_concurrent_configuration
 Concurrent PDSCH processor configuration parameters. More...
 
class  pdsch_processor_concurrent_impl
 Implements a PDSCH processor with concurrent codeblock processing. More...
 
class  pdsch_processor_factory
 
struct  pdsch_processor_generic_configuration
 Generic PDSCH processor configuration parameters. More...
 
class  pdsch_processor_impl
 Implements a generic PDSCH processor. More...
 
struct  pdsch_processor_lite_configuration
 Lite PDSCH processor configuration parameters. More...
 
class  pdsch_processor_lite_impl
 Implements a PDSCH processor with low memory footprint codeblock processing. More...
 
class  pdsch_processor_notifier
 
class  pdsch_processor_pool
 PDSCH processor pool. More...
 
class  pdsch_processor_validator_impl
 Implements a parameter validator for pdsch_processor_impl. More...
 
struct  pdsch_serving_cell_config
 PDSCH-ServingCellConfig, as per TS38.331. More...
 
struct  pdsch_time_domain_resource_allocation
 
class  pdu_rx_handler
 
class  pdxch_processor
 PDxCH processor main interface. More...
 
class  pdxch_processor_baseband
 Lower physical layer PDxCH processor - Baseband interface. More...
 
struct  pdxch_processor_configuration
 Collects the necessary parameters to create a PDxCH processor. More...
 
class  pdxch_processor_factory
 Lower physical layer PDxCH processor - Factory interface. More...
 
class  pdxch_processor_impl
 Implements PDxCH baseband processor. More...
 
class  pdxch_processor_notifier
 Lower physical layer PDxCH processor - Notifier interface. More...
 
class  pdxch_processor_request_handler
 Lower physical layer downlink processor - Request handler interface. More...
 
class  phase_compensation_lut
 Phase compensation as per TS38.211 Section 5.4. More...
 
struct  phr_config
 PHR-Config, TS 38.331. More...
 
struct  phr_report
 UL Power Headroom Report (PHR). More...
 
struct  phy_cell_group_appconfig
 Parameters that are used to initialize or build the PhysicalCellGroupConfig, TS 38.331. More...
 
struct  phy_cell_group_params
 Parameters that are used to initialize or build the PhysicalCellGroupConfig, TS 38.331. More...
 
class  phy_error_adapter
 Implements a generic physical layer error adapter. More...
 
class  phy_rg_gateway_adapter
 Implements a generic physical layer resource grid gateway adapter. More...
 
class  phy_rx_symbol_adapter
 Implements a generic physical layer receive symbol adapter. More...
 
class  phy_rx_symbol_request_adapter
 Implements a generic physical layer adapter for symbol capture event requests. More...
 
class  phy_test_mode_adapter
 
class  phy_time_unit
 Physical layer time unit. More...
 
class  phy_timing_adapter
 Implements a generic physical layer timing adapter. More...
 
struct  physical_cell_group_config
 PhysicalCellGroupConfig, TS 38.331. More...
 
class  polar_allocator
 
class  polar_allocator_impl
 
class  polar_code
 Polar code interface. More...
 
class  polar_code_impl
 Implementation of the polar code interface based on look-up tables. More...
 
class  polar_deallocator
 
class  polar_deallocator_impl
 
class  polar_decoder
 Polar decoder interface. More...
 
class  polar_decoder_impl
 Polar decoder implementation. More...
 
class  polar_encoder
 
class  polar_encoder_impl
 
class  polar_factory
 
class  polar_interleaver
 
class  polar_interleaver_impl
 
class  polar_rate_dematcher
 Polar code rate dematching interface. It reverts the operations of polar_rate_matcher. More...
 
class  polar_rate_dematcher_impl
 Polar code rate dematching implementation. More...
 
class  polar_rate_matcher
 
class  polar_rate_matcher_impl
 
class  port_channel_estimator
 DM-RS-based channel estimator for one receive antenna port. More...
 
class  port_channel_estimator_average_impl
 Port channel estimator that averages all OFDM symbols containing DM-RS. More...
 
class  port_channel_estimator_factory
 
struct  prach_appconfig
 PRACH application configuration. More...
 
class  prach_buffer
 PRACH buffer interface. More...
 
struct  prach_buffer_context
 Collects PRACH time and frequency mapping parameters. More...
 
class  prach_buffer_impl
 PRACH buffer with a fix storage size at initialization. More...
 
class  prach_buffer_pool
 Pool of PRACH buffers. More...
 
class  prach_buffer_pool_impl
 Implementation of the PRACH buffer pool. More...
 
struct  prach_configuration
 Contains the PRACH configuration parameters. More...
 
struct  prach_detection_result
 Describes a PRACH detection result. More...
 
class  prach_detector
 Describes a PRACH detector interface. More...
 
class  prach_detector_factory
 
struct  prach_detector_factory_sw_configuration
 
class  prach_detector_generic_impl
 Implements a simple PRACH detector. More...
 
class  prach_detector_pool
 Concurrent PRACH detector pool. More...
 
class  prach_detector_validator
 Describes the PRACH detector validator interface. More...
 
class  prach_detector_validator_impl
 Implements a parameter validator for prach_detector_simple_impl. More...
 
struct  prach_frequency_mapping_information
 Collects PRACH frequency mapping information as per TS38.211 Section 5.3.2 and Section 6.3.3.2. More...
 
class  prach_generator
 PRACH generator interface. More...
 
class  prach_generator_factory
 
class  prach_generator_impl
 On-demand PRACH time-domain signal generator. More...
 
struct  prach_occasion_info
 
struct  prach_preamble_information
 Collects PRACH preamble information parameters. More...
 
class  prach_processor
 PRACH processor main interface. More...
 
class  prach_processor_baseband
 Lower physical layer PRACH processor - Baseband interface. More...
 
class  prach_processor_factory
 Lower physical layer PRACH processor - Factory interface. More...
 
class  prach_processor_impl
 PRACH processor implementation. More...
 
class  prach_processor_notifier
 Lower physical layer PRACH processor - Notifier interface. More...
 
class  prach_processor_request_handler
 Lower physical layer PRACH processor - Request handler interface. More...
 
class  prach_processor_worker
 Lower PHY PRACH processor worker subcomponent. More...
 
class  prach_scheduler
 
struct  prach_symbols_slots_duration
 Collects PRACH preamble duration information. More...
 
struct  prb_bundling
 Indicates the PRB bundle type and bundle size(s). More...
 
struct  prb_interval
 Struct to express a {min,...,max} range of PRB indexes within a BWP. More...
 
struct  prbs_calculator_sch_config
 Collects the parameters to calculate the num. of PRBS given the payload size, for a PDSCH transmission. More...
 
class  precoding_configuration
 Precoder configuration. More...
 
class  precoding_weight_matrix
 Precoding matrix, consisting of complex coefficients arranged by i) transmit layers and ii) antenna ports. More...
 
class  prefixed_logger
 
class  priority_enqueuer
 Static interface used to push elements to a concurrent_queue both in a blocking or non-blocking fashion. More...
 
class  priority_task_worker
 Task worker that can handle tasks with different levels of priority. More...
 
class  priority_task_worker_executor
 Task executor with Priority (lower is higher) for priority_task_worker. More...
 
class  priority_task_worker_pool_executor
 Task executor that pushes tasks to worker pool with a given priority. More...
 
class  processor_handler_adaptor
 Adapts the lower physical layer handlers to the internal processors request handlers. More...
 
class  processor_notifier_adaptor
 Lower physical layer processor notification adaptor. More...
 
class  processor_pool_repository
 Repository of processor pools. More...
 
class  protocol_transaction
 Protocol Transaction Awaitable. This awaitable is single-use, after which, the respective transaction_manager class will reset its underlying event state. More...
 
class  protocol_transaction_event_source
 Publisher of application protocol transaction outcomes to which an observer can subscribe to. More...
 
class  protocol_transaction_manager
 Manager of multiple concurrent protocol transactions. Each managed transaction can be uniquely identified by a "transaction_id" integer value, which is automatically assigned by the protocol_transaction_manager. Transactions are single-use, meaning that the user will have to create new transaction objects, with different transaction_ids for every message exchange. To create a new transaction, the user may call "create_transaction(...)", where a timeout for the transaction can be optionally defined. More...
 
class  protocol_transaction_outcome_observer
 Observer of application protocol transaction outcome. More...
 
class  pseudo_random_generator
 Pseudo-random sequence generator interface compliant to TS38.211 Section 5.2.1. More...
 
class  pseudo_random_generator_factory
 
class  pseudo_random_generator_fast_advance
 Implements a pseudo-random fast state advance class. More...
 
class  pseudo_random_generator_fast_advance< 0 >
 Specialized fast advance with maximum number of steps equal to zero. More...
 
class  pseudo_random_generator_impl
 SSE-optimized implementation of the pseudo-random generator. More...
 
class  pseudo_random_generator_sequence
 Generates the pseudo-random sequence defined in TS38.211 Section 5.2.1. More...
 
class  pseudo_random_initializer_x1
 State sequence $x_1(n)$ initializer. More...
 
class  pseudo_random_initializer_x2
 State sequence $x_2(n)$ initializer. More...
 
class  pss_processor
 Describes a PSS processor interface. More...
 
class  pss_processor_factory
 
class  pss_processor_impl
 
struct  psup_dl_pdu_session_information
 
class  psup_packing
 
struct  psup_ul_pdu_session_information
 
struct  ptrs_uplink_config
 Associates one or two DL reference signals with a corresponding quasi-colocation (QCL) type. More...
 
class  pucch_allocator
 PUCCH scheduling interface. More...
 
class  pucch_allocator_impl
 Implementation of the PUCCH allocator interface. More...
 
struct  pucch_appconfig
 
struct  pucch_builder_params
 Parameters for PUCCH configuration. Defines the parameters that are used for the PUCCH configuration builder. These parameters are used to define the number of PUCCH resources, as well as the PUCCH format-specific parameters. More...
 
struct  pucch_common_all_formats
 
struct  pucch_config
 PUCCH-Config, TS 38.331. More...
 
struct  pucch_config_common
 
class  pucch_context
 PUCCH transmission context. More...
 
struct  pucch_default_resource
 Collects the default PUCCH resource parameters given by TS38.213 Table 9.2.1-1. More...
 
class  pucch_demodulator
 PUCCH demodulator interface for Formats 2, 3 and 4. More...
 
class  pucch_demodulator_factory
 
class  pucch_demodulator_impl
 PUCCH demodulator implementation. More...
 
class  pucch_detector
 PUCCH detector interface for Formats 0 and 1. More...
 
class  pucch_detector_factory
 
class  pucch_detector_impl
 PUCCH detector implementation for Formats 0 and 1. More...
 
struct  pucch_f1_params
 Collects the parameters for PUCCH Format 1 that can be configured. More...
 
struct  pucch_f2_params
 Collects the parameters for PUCCH Format 2 that can be configured. More...
 
struct  pucch_format_0
 Scheduler output for PUCCH Format 0. More...
 
struct  pucch_format_0_cfg
 Configuration for PUCCH-format0, in PUCCH-Config, TS 38.331. More...
 
struct  pucch_format_1
 Scheduler output for PUCCH Format 1. More...
 
struct  pucch_format_1_cfg
 Configuration for PUCCH-format1, in PUCCH-Config, TS 38.331. More...
 
struct  pucch_format_2
 Scheduler output for PUCCH Format 2. More...
 
struct  pucch_format_2_3_cfg
 Configuration for PUCCH-format2, in PUCCH-Config, TS 38.331. More...
 
struct  pucch_format_3
 Scheduler output for PUCCH Format 3. More...
 
struct  pucch_format_4
 Scheduler output for PUCCH Format 4. More...
 
struct  pucch_format_4_cfg
 Configuration for PUCCH-format4, in PUCCH-Config, TS 38.331. More...
 
class  pucch_guardbands_scheduler
 
struct  pucch_harq_resource_alloc_record
 Containers used to return the output of the PUCCH resource manager. More...
 
class  pucch_helper
 
struct  pucch_info
 Info about PUCCH used resource. More...
 
class  pucch_orthogonal_sequence
 
class  pucch_pdu_validator
 Describes the PUCCH processor validator interface. More...
 
class  pucch_pdu_validator_impl
 Implements a parameter validator for pucch_processor_impl. More...
 
class  pucch_processor
 PUCCH processor interface for all formats. More...
 
class  pucch_processor_factory
 
class  pucch_processor_impl
 Implementation of the PUCCH processor interface. More...
 
class  pucch_processor_pool
 Concurrent PUCCH processor pool. More...
 
struct  pucch_processor_result
 Collects PUCCH processor results. More...
 
struct  pucch_res_id_t
 Defines a couple of PUCCH resource IDs, the cell's and UE's resource PUCCH resource ID, respectively. More...
 
struct  pucch_resource
 PUCCH-Resource, in PUCCH-Config, TS 38.331. More...
 
class  pucch_resource_manager
 Class that manages the cell allocation of PUCCH resources across UEs. The correct functioning of pucch_resource_manager is based on the following assumptions: (i) Each UE has max 8 PUCCH F1 and max 8 PUCCH F2 dedicated to HARQ-ACK reporting. (ii) Each UE has max 1 SR-dedicated PUCCH F1 resource and max 1 CSI-dedicated PUCCH F2 resource. (iii) The cell PUCCH resource list can have max 128 PUCCH resource, including all formats; at cell level, there is no constraint on how many resource must be F1, F2, or for SR or for CSI. (vi) UEs can have different PUCCH resource lists; however the PUCCH resource ID is unique with the cell. This implies that if two UEs have the same PUCCH resource within their lists, their PUCCH resource ID must be the same. (v) Indexing of the PUCCH F1 and PUCCH F2 resources for HARQ-ACK reporting must be contiguous within the F1 group and with F2 group. However, the last PUCCH F1 group resource's and the first PUCCH F2 group resource's indices need not be contiguous. E.g., PUCCH F1 indices (for HARQ-ACK reporting) = {0, ..., 7}, and PUCCH F2 indices (for HARQ-ACK reporting) = {10, ..., 17}. More...
 
struct  pucch_resource_set
 
struct  pucch_resources
 PRBs and symbols used for PUCCH resources. More...
 
struct  pucch_tpc_command_config
 UE Transmit Power Control (TPC) command configuration for PUCCH. More...
 
struct  pucch_uci_bits
 Contains the number of UCI HARQ-ACK and CSI information bits of a removed PUCCH grant. More...
 
class  pucch_uci_message
 Collects the uplink control information message. More...
 
struct  pusch_appconfig
 PUSCH application configuration. More...
 
class  pusch_codeblock_decoder
 PUSCH code block decoder. More...
 
class  pusch_codeword_buffer
 PUSCH codeword buffer interface. More...
 
struct  pusch_config
 Used to configure the UE specific PUSCH parameters applicable to a particular BWP. More...
 
struct  pusch_config_common
 
struct  pusch_config_params
 
class  pusch_context
 PUSCH transmission context. More...
 
class  pusch_decoder
 PUSCH decoder interface. More...
 
class  pusch_decoder_buffer
 PUSCH decoder buffer interface. More...
 
class  pusch_decoder_buffer_dummy
 Implements a dummy PUSCH decoder buffer. More...
 
class  pusch_decoder_factory
 
struct  pusch_decoder_factory_hw_configuration
 HW-accelerated PUSCH decoder factory configuration parameters. More...
 
struct  pusch_decoder_factory_sw_configuration
 
class  pusch_decoder_hw_impl
 Generic hardware-accelerated implementation of the PUSCH decoder. More...
 
class  pusch_decoder_impl
 Implementation of the PUSCH decoder. More...
 
class  pusch_decoder_notifier
 PUSCH decoder interface to notify the decoding of a transport block. More...
 
struct  pusch_decoder_result
 PUSCH decoding statistics. More...
 
struct  pusch_default_time_allocation_config
 Collects the PUSCH default time-domain allocation parameters. More...
 
class  pusch_demodulator
 PUSCH demodulator interface. More...
 
class  pusch_demodulator_factory
 
class  pusch_demodulator_impl
 PUSCH demodulator implementation. More...
 
class  pusch_demodulator_notifier
 PUSCH demodulator interface to notify the demodulation statistics of a codeword. More...
 
struct  pusch_dmrs_symbol_mask_mapping_type_A_single_configuration
 Collects the necessary parameters to calculate the DM-RS symbol mask for a TypeA PUSCH mapping and single duration DMRS. More...
 
struct  pusch_information
 
class  pusch_pdu_validator
 Describes the PUSCH processor validator interface. More...
 
class  pusch_processor
 Describes the PUSCH processor interface. More...
 
class  pusch_processor_csi_part1_feedback
 
class  pusch_processor_factory
 
struct  pusch_processor_factory_sw_configuration
 
class  pusch_processor_impl
 Implements a generic software PUSCH processor. More...
 
class  pusch_processor_notifier_adaptor
 Adapts the notifiers of each PUSCH decoder to the PUSCH processor notifier. More...
 
class  pusch_processor_pool
 PUSCH processor pool. More...
 
struct  pusch_processor_result_control
 Groups the PUSCH processor UL-SCH control decode results. More...
 
struct  pusch_processor_result_data
 Groups the PUSCH processor UL-SCH data decode results. More...
 
class  pusch_processor_result_notifier
 PUSCH processor result notifier. More...
 
class  pusch_processor_validator_impl
 Implements a parameter validator for pusch_processor_impl. More...
 
struct  pusch_serving_cell_config
 Used to configure UE specific PUSCH parameters that are common across the UE's BWPs of one serving cell. More...
 
struct  pusch_time_domain_resource_allocation
 
struct  pusch_tpc_command_config
 UE Transmit Power Control (TPC) command configuration for PUSCH. More...
 
class  pusch_tpmi_select_info
 PUSCH Transmit Precoding Matrix Indication (TPMI) information. More...
 
class  pusch_uci_decoder_notifier
 PUSCH UCI decoder interface to notify the decoding of a UCI message field. More...
 
class  pusch_uci_decoder_wrapper
 Decodes UCI messages multiplexed in PUSCH. More...
 
struct  pusch_uci_field
 Collects the results of UCI field decoding. More...
 
class  puxch_processor
 PUCCH and PUSCH processor main interface. More...
 
class  puxch_processor_baseband
 Lower physical layer PUxCH processor - Baseband interface. More...
 
struct  puxch_processor_configuration
 Collects the necessary parameters to create a PUxCH processor. More...
 
class  puxch_processor_factory
 Lower physical layer PUxCH processor - Factory interface. More...
 
class  puxch_processor_impl
 
class  puxch_processor_notifier
 Lower physical layer PUxCH processor - Notifier interface. More...
 
class  puxch_processor_request_handler
 Lower physical layer PUxCH processor - Request handler interface. More...
 
struct  qcl_info
 Associates one or two DL reference signals with a corresponding quasi-colocation (QCL) type. More...
 
struct  qos_appconfig
 QoS configuration. More...
 
struct  qos_characteristics_t
 
struct  ra_frequency_type1_configuration
 Describes the resource allocation in frequency domain for Type1 as per TS38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink. More...
 
struct  ra_frequency_type1_special_configuration
 Describes the resource allocation in frequency domain for Type1 special case as per TS38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink. More...
 
class  ra_scheduler
 Scheduler for PRACH occasions, RAR PDSCHs and Msg3 PUSCH grants. More...
 
struct  rach_config_common
 Used to specify the cell-specific random-access parameters as per TS 38.331, "RACH-ConfigCommon". More...
 
struct  rach_config_generic
 
struct  rach_indication_message
 RACH indication Message. It contains all the RACHs detected in a given slot and cell. More...
 
class  radio_base
 Describes the base interface for radio classes. More...
 
class  radio_config_uhd_config_validator
 Radio configuration validator for uhd based radios. More...
 
class  radio_config_zmq_config_validator
 Radio configuration validator for ZMQ based radios. More...
 
class  radio_factory
 Describes a radio session factory for a determined radio implementation. More...
 
class  radio_factory_uhd_impl
 
class  radio_factory_zmq_impl
 Describes a ZeroMQ Radio based factory. More...
 
class  radio_management_plane
 Defines a radio baseband unit management plane interface. More...
 
class  radio_notification_handler
 Describes a baseband unit event notifier interface. More...
 
class  radio_notification_handler_counter
 
class  radio_notification_handler_logger
 
class  radio_notification_handler_printer
 
class  radio_notifier_spy
 
class  radio_session
 Describes a radio baseband unit session interface. More...
 
class  radio_session_uhd_impl
 Describes a radio session based on UHD that also implements the management and data plane functions. More...
 
class  radio_session_zmq_impl
 Describes a ZeroMQ radio based session. More...
 
class  radio_uhd_baseband_gateway
 Implement baseband gateway interface for UHD. More...
 
class  radio_uhd_device
 
class  radio_uhd_device_type
 
class  radio_uhd_rx_stream
 Implements a gateway receiver based on UHD receive stream. More...
 
class  radio_uhd_tx_stream
 Implements a gateway transmitter based on UHD transmit stream. More...
 
class  radio_uhd_tx_stream_fsm
 
class  radio_unit
 Radio Unit interface. More...
 
class  radio_zmq_baseband_gateway
 Implement baseband gateway interface for UHD. More...
 
class  radio_zmq_rx_channel
 
class  radio_zmq_rx_channel_fsm
 
class  radio_zmq_rx_stream
 Implements a gateway receiver based on ZMQ receive socket. More...
 
class  radio_zmq_timer
 
class  radio_zmq_tx_align_interface
 Interface for transmitter alignment from the receiver. More...
 
class  radio_zmq_tx_channel
 
class  radio_zmq_tx_channel_fsm
 
class  radio_zmq_tx_stream
 Implements a gateway receiver based on ZMQ transmit socket. More...
 
struct  rar_information
 Stores the information associated with a RAR. More...
 
class  rar_pdu_assembler
 Encodes RAR PDUs based on RAR information provided by the scheduler. More...
 
struct  rar_ul_grant
 RAR grant composed of subheader as per TS38.321 6.2.2, payload as per TS38.321 6.2.3, with UL grant as per TS38.213, Table 8.2-1. More...
 
struct  rate_match_pattern
 Rate matching pattern for PDSCH. More...
 
class  rb_allocation
 Describes the frequency allocation for PDSCH and PUSCH transmissions. More...
 
class  rb_id_t
 Radio Bearer Identity, e.g. SRB1, DRB1, DRB2,... More...
 
class  re_buffer_reader
 Resource Element buffer read-only interface. More...
 
class  re_buffer_reader_view
 Implements a resource element buffer reader view, with read-only access methods. More...
 
class  re_buffer_writer
 Resource Element buffer read-write interface. More...
 
class  re_buffer_writer_view
 Implements a resource element buffer writer view, with read-write access methods. More...
 
class  re_measurement
 Container interface for RE measurements. More...
 
struct  re_measurement_dimensions
 Describes the data structure containing the RE measurements. More...
 
struct  re_pattern
 Describes a resource element pattern within a resource grid. More...
 
class  re_pattern_list
 Describes a resource element pattern list. More...
 
class  re_prb_mask
 Represents a RE mask within a PRB. More...
 
class  remote_f1ap_pdu_handler
 
class  resource_grid
 Describes a resource grid class with writer and reader interfaces. More...
 
class  resource_grid_base
 Resource grid base interface. More...
 
struct  resource_grid_context
 Describes the transmission and reception context. More...
 
struct  resource_grid_coordinate
 Describes a resource grid coordinate as symbol index and carrier. More...
 
class  resource_grid_factory
 Factory that builds resource grids. More...
 
class  resource_grid_impl
 Implements a resource grid and mapper. More...
 
class  resource_grid_mapper
 Resource Element mapping interface. More...
 
class  resource_grid_mapper_impl
 Implements a resource grid mapper. More...
 
class  resource_grid_pool
 Describes a resource grid pool interface. More...
 
class  resource_grid_pool_asynchronous_impl
 Implements a generic resource grid pool that zeroes the resource grids after a number of slots. More...
 
class  resource_grid_pool_generic_impl
 Implements a generic resource grid pool. More...
 
class  resource_grid_reader
 Describes a resource grid reader interface. More...
 
class  resource_grid_reader_empty
 Defines an empty resource grid reader that behaves as it is filled with zeros. More...
 
class  resource_grid_reader_impl
 Implements the resource grid reader interface. More...
 
class  resource_grid_request_pool
 Thread-safe resource grid request pool. More...
 
class  resource_grid_writer
 Resource grid writer interface. More...
 
class  resource_grid_writer_impl
 Implements the resource grid writer interface. More...
 
struct  ri_li_cqi_cri_sizes
 Collects the RI, LI, wideband CQI, and CSI fields bit-width. More...
 
struct  ric_action_t
 This defines the RIC action struct. More...
 
class  ring_buffer_pool
 This pool returns spans of bytes, which have been allocated using a ring memory allocator. It assumes that the underlying memory resource of size mem_size_bytes is large enough so that no overflows ever happen. More...
 
class  ring_memory_allocator
 This memory allocator allocates chunks of a contiguous memory region in a circular fashion. More...
 
struct  rlc_am_appconfig
 RLC AM configuration. More...
 
struct  rlc_am_config
 Configurable parameters for RLC AM. More...
 
class  rlc_am_entity
 
struct  rlc_am_pdu_header
 AM PDU header. More...
 
struct  rlc_am_rx_metrics
 
struct  rlc_am_status_nack
 Status PDU NACK. More...
 
class  rlc_am_status_pdu
 AM Status PDU. More...
 
struct  rlc_am_tx_metrics
 
struct  rlc_am_tx_metrics_atomic_lower
 
struct  rlc_appconfig
 RLC configuration. More...
 
class  rlc_base_entity
 
class  rlc_bearer_log_prefix
 
struct  rlc_config
 Configuration of RLC bearer. More...
 
class  rlc_entity
 
struct  rlc_entity_creation_message
 
struct  rlc_metrics
 Container to hold TX/RX metrics. More...
 
class  rlc_metrics_notifier
 Notifier interface used to report RLC metrics. More...
 
class  rlc_metrics_plotter_json
 Class used to receive metrics reports from scheduler and format them into a JSON file. More...
 
class  rlc_metrics_source
 
class  rlc_pcap
 Interface class for writing a RLC PCAP to a file. More...
 
class  rlc_pcap_impl
 
class  rlc_pdu_recycler
 Recycling bin for discarded PDUs that shall be deleted by a different executor off a real-time critical path. This class is intended to offload the time-consumping deletion of thousands byte_buffer objects of ACK'ed PDUs from tx_window upon reception of the RLC AM status report, which is handled by the pcell_executor in a real-time critical path. More...
 
class  rlc_retx_queue
 
struct  rlc_retx_queue_item
 
class  rlc_retx_queue_state
 
struct  rlc_rx_am_appconfig
 RLC UM RX configuration. More...
 
struct  rlc_rx_am_config
 Configurable Rx parameters for RLC AM. More...
 
class  rlc_rx_am_entity
 
struct  rlc_rx_am_sdu_info
 Container to collect received SDU segments and to assemble the SDU upon completion. More...
 
struct  rlc_rx_am_sdu_segment
 AM SDU segment container. More...
 
struct  rlc_rx_am_sdu_segment_cmp
 AM SDU segment compare object. More...
 
struct  rlc_rx_am_state
 Rx state variables Ref: 3GPP TS 38.322 version 16.2.0 Section 7.1. More...
 
class  rlc_rx_am_status_provider
 
class  rlc_rx_entity
 
class  rlc_rx_lower_layer_interface
 
struct  rlc_rx_metrics
 
class  rlc_rx_metrics_container
 
class  rlc_rx_metrics_interface
 
struct  rlc_rx_tm_config
 Configurable Rx parameters for RLC TM. More...
 
class  rlc_rx_tm_entity
 
struct  rlc_rx_um_appconfig
 RLC UM RX configuration. More...
 
struct  rlc_rx_um_config
 Configurable Rx parameters for RLC UM. More...
 
class  rlc_rx_um_entity
 
struct  rlc_rx_um_sdu_info
 Container to collect received SDU segments and to assemble the SDU upon completion. More...
 
struct  rlc_rx_um_sdu_segment
 UM SDU segment container. More...
 
struct  rlc_rx_um_sdu_segment_cmp
 UM SDU segment compare object. More...
 
struct  rlc_rx_um_state
 Rx state variables Ref: 3GPP TS 38.322 version 16.2.0 Section 7.1. More...
 
class  rlc_rx_upper_layer_data_notifier
 
struct  rlc_sdu
 
class  rlc_sdu_queue
 
class  rlc_sdu_queue_lockfree
 Lockfree RLC SDU queue. More...
 
struct  rlc_tm_config
 Configurable parameters for RLC TM. More...
 
class  rlc_tm_entity
 
struct  rlc_tm_rx_metrics
 
struct  rlc_tm_tx_metrics
 
struct  rlc_tm_tx_metrics_atomic_lower
 
struct  rlc_tx_am_appconfig
 RLC UM TX configuration. More...
 
struct  rlc_tx_am_config
 Configurable Tx parameters for RLC AM. More...
 
class  rlc_tx_am_entity
 
struct  rlc_tx_am_sdu_info
 Container to hold a SDU for transmission, the progress in case of segmentation, and associated meta data. More...
 
struct  rlc_tx_am_state
 TX state variables Ref: 3GPP TS 38.322 version 16.2.0 Section 7.1. More...
 
class  rlc_tx_am_status_handler
 
class  rlc_tx_am_status_notifier
 
struct  rlc_tx_amd_retx
 
class  rlc_tx_entity
 
class  rlc_tx_lower_layer_interface
 
class  rlc_tx_lower_layer_notifier
 
struct  rlc_tx_metrics
 
struct  rlc_tx_metrics_atomic_higher
 
struct  rlc_tx_metrics_atomic_lower
 
class  rlc_tx_metrics_container
 
class  rlc_tx_metrics_interface
 
struct  rlc_tx_tm_config
 Configurable Tx parameters for RLC TM. More...
 
class  rlc_tx_tm_entity
 
struct  rlc_tx_um_appconfig
 RLC UM TX configuration. More...
 
struct  rlc_tx_um_config
 Configurable Tx parameters for RLC UM. More...
 
class  rlc_tx_um_entity
 
struct  rlc_tx_um_state
 TX state variables Ref: 3GPP TS 38.322 version 16.2.0 Section 7.1. More...
 
class  rlc_tx_upper_layer_control_notifier
 
class  rlc_tx_upper_layer_data_interface
 
class  rlc_tx_upper_layer_data_notifier
 
struct  rlc_um_appconfig
 RLC UM configuration. More...
 
struct  rlc_um_config
 Configurable parameters for RLC UM. More...
 
class  rlc_um_entity
 
struct  rlc_um_pdu_header
 
struct  rlc_um_rx_metrics
 
struct  rlc_um_tx_metrics
 
struct  rlc_um_tx_metrics_atomic_lower
 
class  rlf_detector
 Detector of RLFs in the MAC, based on HARQ-ACK and CRC indications. More...
 
struct  rlf_metrics
 Metrics used as reference to detect/trigger RLF. More...
 
class  rnti_manager
 Extends DU RNTI Table with the ability to allocate unique RNTIs for UEs. More...
 
class  rnti_value_table
 Table used by MAC to convert from RNTI to a value in a thread-safe manner. More...
 
struct  rrc_appconfig
 RRC specific configuration parameters. More...
 
struct  ru_configuration
 Radio Unit configuration. More...
 
class  ru_controller
 Radio Unit - control interface. More...
 
class  ru_controller_generic_impl
 Radio Unit controller generic implementation. More...
 
class  ru_downlink_handler_generic_impl
 Radio Unit downlink handler generic implementation. More...
 
class  ru_downlink_plane_handler
 Radio Unit resource grid handler interface. More...
 
class  ru_downlink_plane_handler_proxy
 This proxy implementation dispatches the requests to the corresponding OFH sector. More...
 
struct  ru_dummy_appconfig
 gNB app dummy Radio Unit configuration. More...
 
struct  ru_dummy_configuration
 Collects the necessary parameters for the dummy radio unit. More...
 
struct  ru_dummy_dependencies
 Collects the necessary dependencies for the dummy radio unit. More...
 
class  ru_dummy_impl
 Implements a dummy radio unit. More...
 
class  ru_dummy_rx_prach_buffer
 Implements a PRACH buffer reader that contains always the same random data. More...
 
class  ru_dummy_rx_resource_grid
 Implements a resource grid reader that contains always the same random data. More...
 
class  ru_dummy_sector
 Implements a RU dummy sector. More...
 
struct  ru_error_context
 Radio Unit error context. More...
 
class  ru_error_notifier
 Radio Unit interface error notifier. More...
 
struct  ru_generic_configuration
 Radio Unit generic configuration. More...
 
class  ru_generic_impl
 Radio Unit generic implementation. More...
 
struct  ru_generic_impl_config
 Radio Unit generic implementation configuration. More...
 
struct  ru_ofh_appconfig
 gNB app Open Fronthaul Radio Unit configuration. More...
 
struct  ru_ofh_base_cell_appconfig
 gNB app Open Fronthaul base cell configuration. More...
 
struct  ru_ofh_cell_appconfig
 gNB app Open Fronthaul cell configuration. More...
 
struct  ru_ofh_configuration
 Radio Unit configuration for the Open Fronthaul implementation. More...
 
class  ru_ofh_controller_impl
 RU controller implementation for the Open Fronthaul interface. More...
 
struct  ru_ofh_dependencies
 Radio Unit dependencies for the Open Fronthaul implementation. More...
 
class  ru_ofh_error_handler_impl
 Radio Unit error handler for the Open Fronthaul interface. More...
 
class  ru_ofh_impl
 Open Fronthaul Radio Unit implementation. More...
 
struct  ru_ofh_impl_config
 Open Fronthaul implementation configuration. More...
 
struct  ru_ofh_impl_dependencies
 Open Fronthaul implementation dependencies. More...
 
class  ru_ofh_rx_symbol_handler_impl
 RU received symbol handler for the Open Fronthaul interface. More...
 
struct  ru_ofh_sector_configuration
 Radio Unit sector configuration for the Open Fronthaul implementation. More...
 
struct  ru_ofh_sector_dependencies
 Radio Unit sector dependencies for the Open Fronthaul implementation. More...
 
class  ru_ofh_timing_notifier_impl
 
class  ru_radio_notification_handler_counter
 Radio Unit radio notification counter. More...
 
class  ru_radio_notification_handler_logger
 Radio Unit radio notification logger. More...
 
class  ru_rx_symbol_adapter
 Implements a generic lower physical layer to Radio Unit receive symbol adapter. More...
 
struct  ru_sdr_appconfig
 gNB app SDR Radio Unit configuration. More...
 
struct  ru_sdr_expert_appconfig
 Expert SDR Radio Unit configuration. More...
 
class  ru_timing_adapter
 Implements a generic lower physical layer to Radio Unit timing adapter. More...
 
class  ru_timing_notifier
 Radio Unit interface to notify timing related events. More...
 
class  ru_uplink_plane_handler
 Radio Unit uplink plane handler. More...
 
class  ru_uplink_plane_handler_proxy
 This proxy implementation dispatches the requests to the corresponding OFH sector. More...
 
class  ru_uplink_plane_rx_symbol_notifier
 Radio Unit notifier for events related to received symbols. More...
 
class  ru_uplink_request_handler_generic_impl
 Radio Unit uplink request handler generic implementation. More...
 
struct  ru_uplink_rx_symbol_context
 Radio Unit uplink received symbol context. More...
 
class  rx_buffer
 Describes a PUSCH rate matcher buffer. More...
 
class  rx_buffer_codeblock_pool
 Manages a codeblock buffer pool. More...
 
class  rx_buffer_impl
 Implements a receiver buffer interface. More...
 
class  rx_buffer_pool
 Describes a receive buffer pool. More...
 
struct  rx_buffer_pool_config
 buffer pool configuration. More...
 
class  rx_buffer_pool_controller
 Receive buffer pool controller interface. More...
 
class  rx_buffer_pool_impl
 Implements a PUSCH rate matcher buffer pool. More...
 
class  rx_payload_buffer_pool
 Represents a pool of payload buffers. More...
 
class  rx_symbol_handler_example
 
struct  s_nssai_t
 
class  sample_statistics
 Keeps track of sample statistics. More...
 
class  sampling_rate
 Sampling rate. More...
 
struct  sch_information
 Collects Shared Channel (SCH) parameters derived from the transport block size and the target code rate. More...
 
struct  sch_mcs_description
 Physical Downlink and Uplink Shared Channel Modulation and Coding Scheme breakdown. More...
 
struct  sch_mcs_tbs
 Container for MCS and TBS results. More...
 
struct  sch_prbs_tbs
 Collects the outputs of the helper that returns the num. of PRBs and TBS, for a PDSCH transmission. More...
 
struct  sched_cell_configuration_request_message
 
class  sched_config_manager
 
class  sched_configuration_notifier
 Interface used by scheduler to notify MAC that a configuration is complete. More...
 
struct  sched_grid_resource
 Basic scheduler resource grid element for resource reservation. More...
 
class  sched_metrics_ue_configurator
 Adds/Removes UEs from the metrics. More...
 
struct  sched_paging_information
 
struct  sched_result
 Scheduler decision made for DL and UL in a given slot. More...
 
struct  sched_ue_config_request
 Request for a new UE configuration provided to the scheduler during UE creation or reconfiguration. More...
 
class  sched_ue_configuration_handler
 Internal scheduler interface to create/update/delete UEs. More...
 
struct  sched_ue_creation_request_message
 Request to create a new UE in scheduler. More...
 
struct  sched_ue_delete_message
 UE Delete Request. More...
 
struct  sched_ue_reconfiguration_message
 UE Reconfiguration Request. More...
 
struct  sched_ue_resource_alloc_config
 Parameters provided to the scheduler to configure the resource allocation of a specific UE. More...
 
struct  scheduler_config
 Configuration used to create a scheduler instance. More...
 
class  scheduler_configurator
 Interface to Add/Remove UEs and Cells. More...
 
class  scheduler_dl_buffer_state_indication_handler
 Scheduler interface to push DL buffer state updates for a given RLC bearer. More...
 
class  scheduler_event_logger
 
struct  scheduler_expert_config
 Scheduling statically configurable expert parameters. More...
 
class  scheduler_feedback_handler
 
class  scheduler_impl
 
class  scheduler_metrics_handler
 Handler of scheduler slot metrics. More...
 
struct  scheduler_paging_expert_config
 Paging scheduling statically configurable expert parameters. More...
 
class  scheduler_paging_handler
 Scheduler interface to handle paging a UE. More...
 
class  scheduler_policy
 
struct  scheduler_ra_expert_config
 Random Access scheduling statically configurable expert parameters. More...
 
class  scheduler_result_logger
 
struct  scheduler_si_expert_config
 System Information scheduling statically configurable expert parameters. More...
 
class  scheduler_slot_handler
 
struct  scheduler_strategy_params
 
class  scheduler_time_rr
 
class  scheduler_ue_configurator
 
struct  scheduler_ue_expert_config
 UE scheduling statically configurable expert parameters. More...
 
struct  scheduler_ue_metrics
 Snapshot of the metrics for a UE. More...
 
class  scheduler_ue_metrics_notifier
 Notifier interface used by scheduler to report UE metrics. More...
 
class  scheduler_ue_metrics_source
 
struct  scheduling_request_resource_config
 SR Configuration, as per SchedulingRequestResourceConfig, TS 38.331. More...
 
struct  scheduling_request_to_addmod
 SchedulingRequestToAddMod, part of SchedulingRequestConfig, TS 38.331. More...
 
struct  scs_specific_carrier
 It provides parameters determining the location and width of the actual carrier. More...
 
class  sctp_network_gateway
 
struct  sctp_network_gateway_config
 Configuration for SCTP network gateway. More...
 
class  sctp_network_gateway_control_notifier
 Interface to inform upper layers about connection establishment, drops, etc. More...
 
class  sctp_network_gateway_controller
 Interface to trigger bind/listen/connect operations on gateway socket. More...
 
struct  sctp_network_gateway_creation_message
 
class  sctp_network_gateway_data_handler
 Interface to inject PDUs into gateway entity. More...
 
class  sctp_network_gateway_impl
 
struct  sdap_config
 Configurable parameters for SDAP mapping. More...
 
struct  sdap_config_t
 
class  sdap_mapper
 DRB to QoS flow mapping. More...
 
class  sdap_session_log_prefix
 
class  sdap_session_trx_log_prefix
 
class  sdu_window
 
class  sdu_window_impl
 This class provides a container for the Tx/Rx windows holding SDU info objects that are indexed by Sequence Numbers (SN) More...
 
struct  search_space_configuration
 SearchSpace configuration as per TS38.331, "SearchSpace". More...
 
struct  search_space_info
 Grouping of common and UE-dedicated information associated with a given search space. More...
 
struct  security_appconfig
 Security configuration parameters. More...
 
struct  security_indication_t
 
struct  security_result_t
 
struct  segmenter_config
 Gathers all segmentation configuration parameters. More...
 
struct  serving_cell_config
 ServingCellConfig, as per TS38.331. More...
 
class  short_block_detector
 Short-block detector interface. More...
 
class  short_block_detector_factory
 
class  short_block_detector_impl
 Generic implementation of the short-block detector. More...
 
class  short_block_encoder
 Short-block encoder interface. More...
 
class  short_block_encoder_impl
 Generic implementation of the short-block encoder. More...
 
struct  si_message_sched_info
 This struct contains the information required for the scheduling of the SI messages by the network. More...
 
class  si_message_scheduler
 
struct  si_message_scheduling_config
 Scheduling parameters of the SI message. More...
 
struct  si_scheduling_config
 Configuration of the SI message scheduling. More...
 
struct  si_scheduling_info_config
 
struct  sib19_info
 
class  sib1_scheduler
 This class schedules the SIB1 and fills the grant to be passed to passed to lower layers. More...
 
struct  sib2_info
 
struct  sib_appconfig
 Configuration of SIBs and SI-message scheduling. More...
 
struct  sib_information
 Stores the information associated with an SIB1 or other SI allocation. More...
 
class  sib_pdu_assembler
 Class that manages the encoding of BCCH-DL-SCH messages to be fit in a Transport Block. More...
 
struct  slice_support_item_t
 
class  slot_event_list
 
class  slot_point
 
class  slot_sync_point
 
class  slotted_array
 Array of optional elements, with the following characteristics: More...
 
class  slotted_id_table
 Represents a slotted array that is indexed via an ID type that is convertible to an integer (e.g. enum). More...
 
class  slotted_id_vector
 Represents a slotted vector that is indexed via an ID type that is convertible to an integer (e.g. enum). More...
 
class  slotted_vector
 Container representing a vector of optional elements. It has the following characteristics: More...
 
class  span
 
struct  speed_state_reselection_params
 
struct  srb_appconfig
 QoS configuration. More...
 
class  srs_channel_matrix
 SRS-based estimated channel matrix. More...
 
struct  srs_config
 
struct  srs_configuration
 Contains the Sounding Reference Signals (SRS) bandwidth configuration parameters. More...
 
struct  srs_tpc_command_config
 UE Transmit Power Control (TPC) command configuration for SRS. More...
 
class  srsran_scheduler_adapter
 This class adapts srsRAN scheduler interface to operate with srsRAN MAC. The configuration completion notification handling (e.g. ue creation complete) is deferred for later processing rather than being processed inline. We defer the processing because we do not want it to take place while the scheduler is still processing the slot_indication, given that latter has higher priority. More...
 
struct  ss_rssi_measurement
 
struct  ssb_appconfig
 
class  ssb_assembler
 
struct  ssb_configuration
 SSB Configuration. More...
 
struct  ssb_freq_location
 Contains the parameters defining the SSB position within the band; returned by the DU config generator. More...
 
class  ssb_freq_position_generator
 Class that implements utilities that compute the SSB position within the band. More...
 
struct  ssb_information
 Stores the information associated with an SSB. More...
 
struct  ssb_mib_data_pdu
 Describes part of the parameters that are encoded in the MIB payload as per TS38.331 Section 6.2.2 - MIB. More...
 
struct  ssb_mtc
 
class  ssb_offset_to_pointA
 Data type used to represent the frequency offset between Point A and the lowest subcarrier of the lowest common resource block that overlaps with the SS/PBCH block. More...
 
class  ssb_pdu_validator
 Describes the SSB processor validator interface. More...
 
class  ssb_processor
 Describes the SSB processor interface. More...
 
struct  ssb_processor_config
 
class  ssb_processor_factory
 
struct  ssb_processor_factory_sw_configuration
 
class  ssb_processor_impl
 
class  ssb_processor_pool
 Concurrent SSB processor pool. More...
 
class  ssb_processor_validator_impl
 Implements a parameter validator for ssb_processor_impl. More...
 
class  ssb_scheduler
 
class  ssb_subcarrier_offset
 Data type used to represent the offset from subcarrier zero in common resource block $N_{CRB}^{SSB}$ to subcarrier zero of the SS/PBCH block. More...
 
class  sss_processor
 Describes a SSS processor interface. More...
 
class  sss_processor_factory
 
class  sss_processor_impl
 
class  static_bit_buffer
 Implements a bit buffer that uses static memory. More...
 
class  static_blocking_queue
 
class  static_re_buffer
 Implements a static resource element buffer. More...
 
class  static_re_measurement
 Static container for RE measurements. More...
 
class  static_tensor
 Static tensor - the dimensions can be resized without allocating memory up to MAX_ELEMENTS elements. More...
 
class  static_vector
 
struct  strong_arithmetic
 
struct  strong_arithmetic_with_underlying_type
 
struct  strong_bitwise
 
struct  strong_comparison
 
struct  strong_comparison_with
 Comparison operator definitions for strong types and the list of types in the template argument pack. More...
 
struct  strong_conversion_to
 Conversion operator definitions for strong types and the list of types in the template argument pack. More...
 
struct  strong_equality
 
struct  strong_equality_with
 Equality operator definitions for strong types and the list of types in the template argument pack. More...
 
struct  strong_increment_decrement
 
struct  strong_multiplication_with
 Multiplication operator definitions for strong types and the list of types in the template argument pack. More...
 
class  strong_type
 Template class for strong typing arithmetic types. More...
 
struct  supported_plmns_item_t
 
struct  suspend_always
 Awaitable that always suspends. More...
 
struct  suspend_never
 Awaitable that never suspends. More...
 
class  symbol_slot_mask
 Represents a symbol mask within a slot. More...
 
class  sync_task_executor
 Blocks the thread calling execute() or defer() until the execution of the pushed task has been completed. More...
 
struct  ta_cmd_ce_payload
 Timing Advance Command CE payload. More...
 
struct  ta_common_t
 
class  ta_manager
 Timing Advance manager for an UE. More...
 
struct  tag
 TAG, or Time Alignment Group, TS 38.331. More...
 
class  task_execution_context
 General execution context to which tasks can be dispatched via task executors. More...
 
class  task_execution_manager
 Repository of execution contexts and task executors. More...
 
class  task_executor
 
class  task_redispatcher
 
class  task_strand
 This class implements a strand of one or more enqueueing policies, each with a different priority. More...
 
class  task_worker_pool
 Simple pool of task workers/threads. The workers share the same queue of task and do not perform work-stealing. More...
 
class  task_worker_pool_executor
 
struct  tbs_calculator_configuration
 Collection of parameters required to calculate the TBS for a shared channel transmission. More...
 
struct  tci_state
 Associates one or two DL reference signals with a corresponding quasi-colocation (QCL) type. More...
 
struct  tdd_configuration
 
struct  tdd_ul_dl_appconfig
 TDD configuration. See TS 38.331, TDD-UL-DL-ConfigCommon. More...
 
struct  tdd_ul_dl_config_common
 
struct  tdd_ul_dl_pattern
 
struct  tdd_ul_dl_pattern_appconfig
 TDD pattern configuration. See TS 38.331, TDD-UL-DL-Pattern. More...
 
class  tensor
 Base tensor interface. More...
 
class  test_delimit_logger
 
class  test_event_tracer
 Class that writes trace events to a vector of strings for testing purposes. More...
 
struct  test_mode_appconfig
 gNB app Test Mode configuration. More...
 
struct  test_mode_ue_appconfig
 
class  test_rgen
 This class creates a random generation interface that is suitable for unit tests. The user has the ability to set a random seed to reproduce tests. More...
 
class  test_ue_info_manager
 Handles information related to the test UE(s). More...
 
class  ticking_ring_buffer_pool
 This pool returns spans of bytes, which have been allocated using a ring memory allocator. Differently from ring_buffer_pool, this pool keeps track of previously allocated bytes, and, on each tick, deallocates the memory that it deems to be too old. This extra check gives this pool the ability to detect potential buffer overflows. More...
 
class  timer_factory
 Factory of timers that associates created timers to specific task executors. More...
 
class  timer_manager
 This class implements the service associated with the management of the timers of the application, including the allocation, destruction, starting/halting and timeout triggering of the registered timers. The user can check and control the state of an individual timer via the respective unique_timer handle object. More...
 
class  tiny_optional
 Tiny optional class. When a specialization of tiny_optional_traits<T, Flags...> is provided, tiny_optional will have detail::base_tiny_optional<T, Flags...> as its base class. Otherwise, optional<T> is used as base class. More...
 
struct  tiny_optional_traits
 Metafunction used to derive the specialization of tiny_optional<T> based on "T" and "T...". More...
 
struct  tiny_optional_traits< std::unique_ptr< T > >
 Specialization for tiny_optional for unique_ptr<T>, where nullptr corresponds to an empty optional. More...
 
struct  tiny_optional_traits< T, AbsentValue >
 Specialization for tiny_optional<T, AbsentValue>, where an instance of T equal to AbsentValue corresponds to an empty optional. More...
 
struct  trace_event
 Trace event used for events with defined name, starting point and duration. More...
 
struct  trace_thres_event
 
class  transport_layer_address
 Representation of an Transport Layer Address. More...
 
class  trx_buffer_identifier
 Identifies transmit and receive buffers. More...
 
struct  tx_power_pdcch_information
 
struct  uci_allocation
 Contains the results of the UCI allocation. More...
 
class  uci_allocator
 UCI allocator interface. Depending on whether there is an existing PUSCH grant, it allocates the UCI either on the PUSCH or PUCCH. More...
 
class  uci_allocator_impl
 Implementation of uci_allocator interface. More...
 
class  uci_cell_decoder
 
class  uci_decoder
 Uplink Control Information decoder. More...
 
class  uci_decoder_factory
 
class  uci_decoder_impl
 Implementation of the UCI decoder. More...
 
struct  uci_indication
 UCI indication for a given UE. More...
 
struct  uci_info
 
struct  uci_on_pusch
 UCI-OnPUSCH, part of PUSCH-Config, as per TS 38.331. More...
 
struct  uci_part2_size_description
 Collects the parameters that describe the UCI Part 1 correspondence to Part 2 sizes. More...
 
class  uci_scheduler
 UCI scheduling interface, which handles the scheduling of SR and CSI opportunities. More...
 
class  uci_scheduler_impl
 
class  udp_network_gateway
 
struct  udp_network_gateway_config
 
class  udp_network_gateway_controller
 Interface to trigger bind/listen/connect operations on gateway socket. More...
 
struct  udp_network_gateway_creation_message
 
class  udp_network_gateway_data_handler
 Interface to inject PDUs into gateway entity. More...
 
class  udp_network_gateway_impl
 
class  ue
 
class  ue_cell
 Context respective to a UE serving cell. More...
 
class  ue_cell_configuration
 UE-dedicated configuration for a given cell. More...
 
class  ue_cell_grid_allocator
 
class  ue_channel_state_manager
 This classes manages all the information related with the channel state that has been received from the UE via CSI (e.g. CQI) or via gNB PHY measurements (e.g. UL SINR). More...
 
class  ue_config_delete_event
 Event to delete a UE in the scheduler. More...
 
class  ue_config_update_event
 Event to create/reconfigure a UE in the scheduler. More...
 
class  ue_configuration
 
struct  ue_creation_command
 Parameters used to create a UE. More...
 
class  ue_event_manager
 Class used to manage events that arrive to the scheduler and are directed at UEs. This class acts as a facade for several of the ue_scheduler subcomponents, managing the asynchronous configuration of the UEs and logging in a thread-safe manner. More...
 
struct  ue_event_prefix
 
class  ue_harq_timeout_notifier
 UE-specific notifier of HARQ process timeouts. More...
 
class  ue_link_adaptation_controller
 Component that handles the derivation of the MCS for a UE, given its CSI, PHY estimates, and experienced channel BLER. More...
 
class  ue_pdsch_allocator
 Allocator of PDSCH grants for UEs. More...
 
struct  ue_pdsch_grant
 Information relative to a UE PDSCH grant. More...
 
class  ue_pdsch_param_candidate_searcher
 This class assists with the search of PDSCH parameters given an UE config that ensures a valid UE PDSCH resource allocation in the Cell Resource Grid. The search iterates through different HARQ, SearchSpace and PDSCH time-domain resource candidates, returning only the valid ones. This class operates as a range with begin() and end() iterators, and only searches for valid candidates in a lazy fashion. That means that we only compute all valid candidates if we iterate from begin() to end(). More...
 
class  ue_procedure_logger
 
class  ue_pusch_allocator
 Allocator of PUSCH grants for UEs. More...
 
struct  ue_pusch_grant
 Information relative to a UE PUSCH grant. More...
 
struct  ue_reconf_command
 Parameters used to reconfigure a UE. More...
 
class  ue_repository
 Container that stores all scheduler UEs. More...
 
class  ue_resource_grid_view
 This struct provides a view of the current resource grid state to the PDSCH and PUSCH allocators. More...
 
class  ue_scheduler
 
struct  ue_scheduler_cell_params
 
class  ue_scheduler_impl
 Interface of data scheduler that is used to allocate UE DL and UL grants in a given slot. The data_scheduler object will be common to all cells and slots. More...
 
class  ue_srb0_scheduler
 Defines SRB0 scheduler that is used to allocate grants for UE's SRB0 DL messages in a given slot. More...
 
struct  ue_timers_and_constants_config
 
class  uhd_exception_handler
 
struct  ul_bsr_indication_message
 UL Buffer Status Report. More...
 
struct  ul_bsr_lcg_report
 UL Buffer Status Report for a single logical channel group. More...
 
struct  ul_ccch_indication_message
 Used to indicate UL CCCH message arrival. More...
 
struct  ul_common_appconfig
 Common uplink parameters of a cell. More...
 
struct  ul_config_common
 Uplink Configuration, common to the serving cell. More...
 
struct  ul_crc_indication
 UL HARQ CRC indication for a given UE PDU. More...
 
struct  ul_crc_pdu_indication
 
class  ul_harq_process
 
class  ul_logical_channel_manager
 
struct  ul_phr_indication_message
 Information and context relative to PHR forwarded by MAC. More...
 
struct  ul_prach_results
 PRACH results structure. More...
 
struct  ul_pucch_context
 PUCCH context. More...
 
struct  ul_pucch_f0_f1_context
 PUCCH context for Format 0 or Format 1. More...
 
struct  ul_pucch_results
 PUCCH results structure. More...
 
struct  ul_pusch_results_control
 Control-related PUSCH decoding output. More...
 
struct  ul_pusch_results_data
 Data-related PUSCH decoding output. More...
 
struct  ul_sched_info
 
struct  ul_sched_result
 
struct  ulsch_configuration
 Collects the necessary parameters to calculate the Uplink Shared Channel (UL-SCH) information. More...
 
class  ulsch_demultiplex
 User interface of the Uplink Shared Channel (UL-SCH) demultiplexer. More...
 
class  ulsch_demultiplex_factory
 
class  ulsch_demultiplex_impl
 
struct  ulsch_information
 Collects Uplink Shared Channel (UL-SCH) derived parameters. More...
 
class  unique_coroutine
 Handle to coroutine object that ensures safe move ctor, move assignment and destruction. More...
 
class  unique_function
 
class  unique_function< R(Args...), Capacity, ForbidAlloc >
 
class  unique_rx_buffer
 Wraps a receive buffer instance and locks it inside a scope. More...
 
class  unique_thread
 
class  unique_timer
 This class represents a timer which invokes a user-provided callback upon timer expiration. To setup a timer session it needs to connect to a timer_manager class. This class is not thread-safe. More...
 
class  unsync_fixed_size_memory_block_pool
 Unsynchronized (not thread-safe) memory pool of memory blocks of equal size. More...
 
struct  up_transport_layer_info
 Identifier for F1-U transport layer associated to a DRB. More...
 
struct  uplink_config
 Uplink configuration, as per UplinkConfig, in ServingCellConfig, TS 38.331. More...
 
class  uplink_pdu_validator
 Uplink processor validation interface. More...
 
class  uplink_processor
 Uplink processor interface. More...
 
class  uplink_processor_baseband
 Lower physical layer uplink processor - Baseband interface. More...
 
struct  uplink_processor_config
 Configuration parameters for uplink processors. More...
 
struct  uplink_processor_configuration
 Describes a sector configuration. More...
 
class  uplink_processor_factory
 Uplink processor factory. More...
 
class  uplink_processor_impl
 Uplink processor implementation. More...
 
class  uplink_processor_notifier
 Lower physical layer uplink processor - Notifier interface. More...
 
class  uplink_processor_pool
 Pool of uplink processors. More...
 
struct  uplink_processor_pool_config
 Describes all uplink processors in a pool. More...
 
class  uplink_processor_pool_impl
 Uplink processor pool implementation. More...
 
struct  uplink_processor_pool_impl_config
 Defines the structure to configure the uplink processor pool. More...
 
class  uplink_processor_task_dispatcher
 Uplink processor implementation with a task dispatcher per channel. More...
 
class  uplink_processor_validator_impl
 Implements the uplink PDU validator for uplink_processor_single_executor_impl. More...
 
class  uplink_request_processor
 Interface of the uplink request processor. More...
 
class  uplink_request_processor_impl
 Implementation of the uplink request processor interface. More...
 
class  uplink_slot_pdu_repository
 Uplink slot PDU repository. More...
 
class  upper_phy
 Upper PHY interface. More...
 
struct  upper_phy_config
 Upper PHY configuration parameters used to create a new upper PHY object. More...
 
class  upper_phy_error_handler
 Upper physical layer error handler. More...
 
class  upper_phy_error_handler_impl
 Upper physical layer error handler implementation. More...
 
class  upper_phy_error_notifier
 Upper physical layer error notifier. More...
 
class  upper_phy_factory
 Factory that builds upper PHY objects. More...
 
class  upper_phy_impl
 Implementation of the upper PHY interface. More...
 
struct  upper_phy_impl_config
 Upper PHY implementation configuration. More...
 
struct  upper_phy_params
 Upper PHY parameters to configure the upper PHY factory. More...
 
class  upper_phy_rg_gateway
 Interface of the upper physical layer resource grid gateway. More...
 
class  upper_phy_rx_results_notifier
 Interface of the upper-PHY notifier in charge of messages carrying the result of uplink detection and decoding. More...
 
class  upper_phy_rx_results_notifier_wrapper
 Wrapper class of the upper PHY receive results notifier. More...
 
struct  upper_phy_rx_symbol_context
 Describes the context of a newly received symbol. More...
 
class  upper_phy_rx_symbol_handler
 Interface of the upper-PHY handler in charge of processing uplink OFDM symbols. More...
 
class  upper_phy_rx_symbol_handler_impl
 Implementation of the upper PHY handler of receive symbols events. More...
 
class  upper_phy_rx_symbol_handler_printer_decorator
 
class  upper_phy_rx_symbol_request_notifier
 Interface of the upper-PHY notifier in charge of requesting symbol captures. More...
 
class  upper_phy_ssb_example
 Upper PHY processor application example interface. More...
 
struct  upper_phy_threads_appconfig
 Upper PHY thread configuration for the gNB. More...
 
struct  upper_phy_timing_context
 Describes the context of the current timing boundary. More...
 
class  upper_phy_timing_handler
 Upper physical layer handler to align timing boundaries. More...
 
class  upper_phy_timing_notifier
 Upper physical layer timing notifier. More...
 
class  upper_ru_dl_rg_adapter
 Upper PHY - Radio Unit downlink adapter. More...
 
class  upper_ru_error_adapter
 Upper PHY - Radio Unit error adapter. More...
 
class  upper_ru_timing_adapter
 Upper PHY - Radio Unit timing adapter. More...
 
class  upper_ru_ul_adapter
 Upper PHY - Radio Unit uplink adapter. More...
 
class  upper_ru_ul_request_adapter
 Upper PHY - Radio Unit uplink request adapter. More...
 
struct  vrb_alloc
 VRB Resource Allocation that can be of allocation type 0 (RBGs) or 1 (VRB range). More...
 
struct  vrb_interval
 Struct to express a {min,...,max} range of VRB indexes. More...
 
class  vrb_to_prb_mapper
 Describes a VRB-to-PRB mapping. More...
 
class  wait_manual_event_tester
 Factory of async tasks that await on an external event. More...
 
class  wait_manual_event_tester< void >
 Specialization for result of type void. More...
 
struct  worker_manager
 Manages the workers of the app. More...
 
struct  zp_csi_rs_resource
 Configuration of ZP-CSI-RS-Resource as per TS38.331. More...
 
struct  zp_csi_rs_resource_set
 Configuration of ZP-CSI-RS-ResourceSet as per TS38.331. More...
 

Typedefs

using task_worker = general_task_worker<>
 Default task worker type.
 
using task_worker_executor = general_task_worker_executor<>
 
template<typename T >
using const_span = span<const T>
 
using unique_task = unique_function<void(), default_unique_task_buffer_size>
 Generic moveable task.
 
using byte_buffer_segment_span_range
 Range of byte spans belonging to a byte_buffer_segment_list.
 
using const_byte_buffer_segment_span_range
 
template<typename ByteBufferType >
using is_byte_buffer_range
 Checks whether a type represents a range of byte_buffer_iterators (e.g. byte_buffer, byte_buffer_slice, byte_buffer_view).
 
using trace_clock = std::chrono::steady_clock
 Trace Event clock types.
 
using trace_point = trace_clock::time_point
 
using trace_duration = std::chrono::microseconds
 
using slot_difference = int
 Represents the difference between two slot points.
 
using slot_interval = interval<slot_point>
 Slot Interval [start, stop).
 
template<typename... Types>
using variant = mpark::variant<Types...>
 
template<typename E >
using error_type = expected<default_success_t, E>
 
using pci_t = uint16_t
 3GPP TS 38.331, PhysCellId ::= INTEGER (0..1007)
 
using ssb_to_measure = bounded_bitset<64>
 
using sib_info = variant<sib2_info, sib19_info>
 Variant type that can hold different types of SIBs that go in a SI message.
 
using timer_duration = std::chrono::milliseconds
 Unit used to represent a time duration in terms of timer_manager ticks.
 
using cf_t = std::complex<float>
 Type to store complex samples.
 
using ci8_t = std::complex<int8_t>
 
using ci16_t = std::complex<int16_t>
 
using freq_resource_bitmap = bounded_bitset<pdcch_constants::MAX_NOF_FREQ_RESOURCES, true>
 
using sch_mcs_index = bounded_integer<uint8_t, 0, 31>
 
using nr_cell_id_t = uint64_t
 36-bit identifying an NR Cell Id as specified in subclause 9.3.1.7 of 3GPP TS 38.413
 
using cause_t = variant<cause_radio_network_t, cause_transport_t, cause_nas_t, cause_protocol_t, cause_misc_t>
 
using harq_pid_value = uint8_t
 HARQ process ID value.
 
using mac_rx_pdu_list = static_vector<mac_rx_pdu, MAX_PUSCH_PDUS_PER_SLOT>
 
using crc_calculator_checksum_t = unsigned
 Checksum type.
 
using described_rx_codeblock = std::pair<span<const log_likelihood_ratio>, codeblock_metadata>
 Alias for the full codeblock characterization at the receiver.
 
using dmrs_symbol_list
 Container for DM-RS symbols.
 
using e2ap_outcome = expected<asn1::e2ap::successful_outcome_s, asn1::e2ap::unsuccessful_outcome_s>
 
using e2ap_transaction = protocol_transaction<e2ap_outcome>
 
using protocol_transaction_id_t = unsigned
 Type of a transaction identifier.
 
template<typename FutureType >
using coro_context = detail::base_coro_frame<typename FutureType::promise_type>
 Helper to pass coroutine frame context to operator() of coroutines.
 
using dmrs_symbol_mask = bounded_bitset<14>
 Data type used to represent a DMRS symbol mask for PDSCH and PUSCH transmissions.
 
using prb_bitmap = bounded_bitset<MAX_NOF_PRBS, true>
 Bitset of PRBs with size up to 275.
 
using csi_aperiodic_trigger_state_list = static_vector<csi_aperiodic_trigger_state, MAX_NOF_CSI_APERIODIC_TRIGGERS>
 
using csi_semi_persistent_on_pusch_trigger_state_list
 
using bad_any_cast = linb::bad_any_cast
 
using any = linb::any
 
using gtpu_teid_t
 
template<typename T , bool RoundUpSizeToPowerOf2 = true>
using ring_buffer = detail::ring_buffer_impl<T, std::vector<T>, RoundUpSizeToPowerOf2>
 
template<typename T , size_t N>
using static_ring_buffer = detail::ring_buffer_impl<T, std::array<T, N>, false>
 Ring buffer with fixed, embedded data storage via a std::array<T, N>. It can contain up to N elements.
 
using manual_event_flag = manual_event<void>
 
typedef static_vector< nru_pdcp_sn_discard_block, nru_max_nof_pdcp_sn_discard_blocks > nru_pdcp_sn_discard_blocks
 
typedef static_vector< nru_lost_nru_sn_range, nru_max_nof_lost_nru_sn_ranges > nru_lost_nru_sn_ranges
 
using dci_payload = bounded_bitset<pdcch_constants::MAX_DCI_PAYLOAD_SIZE>
 DCI payload data type.
 
using dummy_ce_payload = unsigned
 
using rbg_bitmap = bounded_bitset<MAX_NOF_RBGS, true>
 Bitset of RBGs with size up to 18.
 
using validator_result = error_type<std::string>
 
using ri_restriction_type = bounded_bitset<8>
 CSI Rank Indicator restriction type.
 
using cqi_value = bounded_integer<uint8_t, 0, 15>
 Channel Quality Indicator value.
 
using csi_report_wideband_cqi_type = cqi_value
 Channel Quality Indicator type.
 
template<typename T >
using is_iterable = decltype(detail::is_iterable_impl<T>(0))
 
using csi_report_packed = bounded_bitset<csi_report_max_size.value(), false>
 Packed Channel State Information (CSI) report data type.
 
using uplink_slot_pdu_entry = variant<uplink_processor::pusch_pdu, uplink_processor::pucch_pdu>
 Defines an entry of the uplink slot PDU repository.
 
using gtpu_tunnel_logger = prefixed_logger<gtpu_tunnel_log_prefix>
 
using du_rnti_table = rnti_value_table<du_ue_index_t, du_ue_index_t::INVALID_DU_UE_INDEX>
 
using ue_con_res_id_t = std::array<uint8_t, UE_CON_RES_ID_LEN>
 
template<typename T >
using du_ue_list = slotted_array<T, MAX_NOF_DU_UES>
 Representation of a list of UEs indexed by DU UE Index.
 
using ul_bsr_lcg_report_list = static_vector<ul_bsr_lcg_report, MAX_NOF_LCGS>
 
using lcg_bsr_report_list = static_vector<lcg_bsr_report, MAX_NOF_LCGS>
 List of reported UL BSRs.
 
using ph_db_range = interval<int>
 PH value expressed in dB interval as defined in Table 10.1.17.1-1 of TS 38.133.
 
using p_cmax_dbm_range = interval<int>
 P_CMAX,f,c value expressed in dBm interval as defined in Table 10.1.18.1-1 of TS 38.133.
 
using baseband_gateway_timestamp = uint64_t
 Describes a baseband gateway timestamp. It is expressed in multiples of the sample time.
 
using prb_index_list = static_vector<uint16_t, pdcch_constants::MAX_NOF_RB_PDCCH>
 Describes a PRB index list of unsigned 16 bit indicating the PRB index.
 
using uci_payload_type = bounded_bitset<uci_constants::MAX_NOF_PAYLOAD_BITS>
 Generic UCI payload type.
 
using pdcch_candidate_type = uint8_t
 PDCCH candidate and PDCCH candidate list data types.
 
using pdcch_candidate_list = static_vector<pdcch_candidate_type, PDCCH_MAX_NOF_CANDIDATES_SS>
 
using crb_bitmap = bounded_bitset<MAX_NOF_PRBS, true>
 Bitset of CRBs with size up to 275.
 
using crb_index_list = static_vector<uint16_t, pdcch_constants::MAX_NOF_RB_PDCCH>
 List of CRBs for a given PDCCH candidate.
 
using cell_common_configuration_list = slotted_id_vector<du_cell_index_t, std::unique_ptr<cell_configuration>>
 List of common configurations for the cells currently added in the scheduler.
 
using ssb_information_list = srsran::static_vector<ssb_information, MAX_SSB_PER_SLOT>
 
using task_priority = enqueue_priority
 Priority level of an enqueued task in priority_multiqueue_task_worker.
 
template<concurrent_queue_policy QueuePolicy>
using shared_strand_executor = detail::task_strand_executor_impl<QueuePolicy, std::shared_ptr<base_task_strand>>
 Executor with a compile-time defined task priority, that controls the lifetime of the associated strand.
 
using epoll_timer_callback = std::function<void(uint64_t res)>
 Epoll timer handler.
 
template<typename R >
using async_procedure = base_resumable_procedure<async_task<R>>
 Base class of non-coroutine resumable tasks.
 
using free_memory_block_list = detail::intrusive_memory_block_list
 List of memory blocks. It overwrites bytes of blocks passed via push(void*). Thus, it is not safe to use for any pool of initialized objects.
 
using pdcp_bearer_logger = prefixed_logger<pdcp_bearer_log_prefix>
 
using rlc_bearer_logger = prefixed_logger<rlc_bearer_log_prefix>
 
using sdap_session_trx_logger = prefixed_logger<sdap_session_trx_log_prefix>
 
using sdap_session_logger = prefixed_logger<sdap_session_log_prefix>
 

Enumerations

enum class  subcarrier_spacing {
  kHz15 = 0 , kHz30 , kHz60 , kHz120 ,
  kHz240 , invalid
}
 Representation of subcarrier spacing. More...
 
enum class  bs_channel_bandwidth_fr1 {
  invalid = 0 , MHz5 = 5 , MHz10 = 10 , MHz15 = 15 ,
  MHz20 = 20 , MHz25 = 25 , MHz30 = 30 , MHz35 = 35 ,
  MHz40 = 40 , MHz45 = 45 , MHz50 = 50 , MHz60 = 60 ,
  MHz70 = 70 , MHz80 = 80 , MHz90 = 90 , MHz100 = 100
}
 Labels for the BS Channel Bandwidth for FR1, described in TS38.104, Table 5.3.2-1. More...
 
enum class  min_channel_bandwidth {
  MHz5 = 0 , MHz10 , MHz20 , MHz40 ,
  invalid
}
 
enum class  frequency_range { FR1 = 0 , FR2 }
 Labels for the frequency ranges described in TS38.104 Table 5.1-1. More...
 
enum class  concurrent_queue_policy { lockfree_spsc , lockfree_mpmc , locking_mpmc , locking_mpsc }
 Types of concurrent queues. They differ in type of synchronization mechanism and number of producers/consumers supported. Supported types are: More...
 
enum class  concurrent_queue_wait_policy { condition_variable , sleep , non_blocking }
 Types of barriers used for blocking pushes/pops of elements. Three types: More...
 
enum class  enqueue_priority : size_t { min = 0 , max = std::numeric_limits<size_t>::max() }
 Queue priority used to map to specific queue of the priority_multiqueue_task_worker. The higher the priority, the lower its integer value representation. More...
 
enum class  cpu_feature
 CPU feature list. More...
 
enum class  io_broker_type { epoll , io_uring }
 
enum class  lower_phy_thread_profile { blocking = 0 , single , dual , quad }
 Lower physical layer thread profiles. More...
 
enum class  prach_format_type : uint8_t {
  zero = 0 , one , two , three ,
  A1 , A2 , A3 , B1 ,
  B4 , C0 , C2 , A1_B1 ,
  A2_B2 , A3_B3 , invalid
}
 PRACH preamble formats. More...
 
enum class  prach_subcarrier_spacing : uint8_t {
  kHz15 = 0 , kHz30 , kHz60 , kHz120 ,
  kHz1_25 , kHz5 , invalid
}
 Random Access subcarrier spacing. More...
 
enum class  restricted_set_config { UNRESTRICTED , TYPE_A , TYPE_B }
 PRACH Restricted set configuration. More...
 
enum class  gnb_sched_affinity_mask_types {
  l1_dl , l1_ul , l2_cell , ru ,
  low_priority , last
}
 Types of CPU affinity masks in the gNB. More...
 
enum class  gnb_sched_affinity_mask_policy { round_robin = 0 , mask = 1 , last }
 Thread pinning policy to a CPU affinity mask in the gNB. More...
 
enum class  n_ta_offset { n0 = 0 , n25600 = 25600 , n13792 = 13792 , n39936 = 39936 }
 Time advance offset - parameter $N_{TA,offset}$ in TS38.211 Section 4.3.3. More...
 
enum class  nr_band {
  invalid = 0 , n1 = 1 , n2 = 2 , n3 = 3 ,
  n5 = 5 , n7 = 7 , n8 = 8 , n12 = 12 ,
  n13 = 13 , n14 = 14 , n18 = 18 , n20 = 20 ,
  n24 = 24 , n25 = 25 , n26 = 26 , n28 = 28 ,
  n29 = 29 , n30 = 30 , n34 = 34 , n38 = 38 ,
  n39 = 39 , n40 = 40 , n41 = 41 , n46 = 46 ,
  n48 = 48 , n50 = 50 , n51 = 51 , n53 = 53 ,
  n65 = 65 , n66 = 66 , n67 = 67 , n70 = 70 ,
  n71 = 71 , n74 = 74 , n75 = 75 , n76 = 76 ,
  n77 = 77 , n78 = 78 , n79 = 79 , n80 = 80 ,
  n81 = 81 , n82 = 82 , n83 = 83 , n84 = 84 ,
  n85 = 85 , n86 = 86 , n89 = 89 , n90 = 90 ,
  n91 = 91 , n92 = 92 , n93 = 93 , n94 = 94 ,
  n95 = 95 , n96 = 96 , n97 = 97 , n98 = 98 ,
  n99 = 99 , n100 = 100 , n101 = 101 , n102 = 102 ,
  n104 = 104 , n255 = 255 , n256 = 256 , n257 = 257 ,
  n258 = 258 , n259 = 259 , n260 = 260 , n261 = 261 ,
  n262 = 262 , n263 = 263
}
 NR operating bands in FR1 and FR2. More...
 
enum class  ssb_periodicity {
  ms5 = 5 , ms10 = 10 , ms20 = 20 , ms40 = 40 ,
  ms80 = 80 , ms160 = 160
}
 SSB periodicity in milliseconds as per TS38.331 Section 6.3.2 IE ssb-periodicityServingCell. More...
 
enum class  ssb_pss_to_sss_epre { dB_0 , dB_3 }
 PSS EPRE to SSS EPRE for SSB, as per TS 38.213, Section 4.1. More...
 
enum class  ssb_pattern_case {
  A , B , C , D ,
  E , invalid
}
 Labels for the different SS/PBCH block patterns defined in TS38.213 Section 4.1. More...
 
enum class  dc_offset_t : int {
  min = -static_cast<int>(NOF_SUBCARRIERS_PER_RB * MAX_NOF_PRBS) / 2 , center = 0 , max = static_cast<int>(NOF_SUBCARRIERS_PER_RB * MAX_NOF_PRBS) / 2 - 1 , outside = static_cast<int>(NOF_SUBCARRIERS_PER_RB * MAX_NOF_PRBS) / 2 ,
  undetermined = std::numeric_limits<int>::max()
}
 Direct Current (DC) offset, in number of subcarriers. See "txDirectCurrentLocation" in TS 38.331. More...
 
enum class  dmrs_typeA_position { pos2 = 2 , pos3 = 3 }
 Position of first DM-RS for Downlink (see TS 38.211, clause 7.4.1.1.1) and Uplink (see TS 38.211, clause 6.4.1.1.3). More...
 
enum class  dmrs_config_type { type1 = 1 , type2 , not_set }
 
enum class  dmrs_additional_positions { pos0 = 0 , pos1 , pos2 , pos3 }
 Position for additional DM-RS in DL (see TS 38.211, Tables 7.4.1.1.2-3 and 7.4.1.1.2-4). More...
 
enum class  dmrs_max_length { len1 = 1 , len2 , not_set }
 The maximum number of OFDM symbols for DL front loaded DMRS. If set to len2, the UE determines the actual number of DM-RS symbols by the associated DCI. (see TS 38.214, clause 7.4.1.1.2). More...
 
enum class  five_qi_t : uint16_t { min = 0 , max = MAX_FIVEQI , invalid = MAX_FIVEQI + 1 }
 Five QI. More...
 
enum  lcid_t : uint16_t {
  LCID_SRB0 = 0 , LCID_SRB1 = 1 , LCID_SRB2 = 2 , LCID_SRB3 = 3 ,
  LCID_MIN_DRB = 4 , LCID_MAX_DRB = 32 , MAX_NOF_RB_LCIDS = 33 , INVALID_LCID = 64
}
 Logical Channel Identity used to associate one logical channel to the corresponding RLC bearer. Values (0..32) More...
 
enum class  srb_id_t : uint16_t {
  srb0 = 0 , srb1 , srb2 , srb3 ,
  nulltype
}
 
enum class  drb_id_t : uint8_t {
  drb1 = 1 , drb2 , drb3 , drb4 ,
  drb5 , drb6 , drb7 , drb8 ,
  drb9 , drb10 , drb11 , drb12 ,
  drb13 , drb14 , drb15 , drb16 ,
  drb17 , drb18 , drb19 , drb20 ,
  drb21 , drb22 , drb23 , drb24 ,
  drb25 , drb26 , drb27 , drb28 ,
  drb29 , invalid
}
 
enum class  rb_type_t { srb , drb }
 Radio Bearer type, either SRB or DRB. More...
 
enum class  paging_cycle { rf32 = 32 , rf64 = 64 , rf128 = 128 , rf256 = 256 }
 Default paging cycle, used to derive 'T' in TS 38.304. Value rf32 corresponds to 32 radio frames and so on. More...
 
enum  search_space_id : uint8_t { MIN_SEARCH_SPACE_ID = 0 , MAX_SEARCH_SPACE_ID = 39 , MAX_NOF_SEARCH_SPACES = 40 }
 Search Space identifier. This value is UE-specific, which means that a UE can have up to "maxNrofSearchSpaces=40" Search Spaces configured. The ID space is used across BWPs of a serving cell. More...
 
enum class  search_space_set_type {
  type0 , type0A , type1 , type2 ,
  type3 , ue_specific
}
 Search Space Set Type as per TS38.213, Section 10.1. More...
 
enum class  search_space_type { common , ue_dedicated }
 SearchSpace Type. More...
 
enum class  pdsch_mcs_table { qam64 = 0 , qam256 = 1 , qam64LowSe = 2 }
 Modulation and Code Scheme table identifiers for PDSCH. More...
 
enum class  pucch_f4_occ_len { n2 , n4 }
 Options for occ-Length in PUCCH-format4, in PUCCH-Config, TS 38.331. More...
 
enum class  pucch_f4_occ_idx { n0 , n1 , n2 , n3 }
 Options for occ-Index in PUCCH-format4, in PUCCH-Config, TS 38.331. More...
 
enum class  max_pucch_code_rate {
  not_set = 0 , dot_08 , dot_15 , dot_25 ,
  dot_35 , dot_45 , dot_60 , dot_80
}
 Options for PUCCH-MaxCodeRate in PUCCH-Config, TS 38.331. More...
 
enum class  pusch_mcs_table {
  qam64 = 0 , qam256 = 1 , qam64LowSe = 2 , qam64_tp = 3 ,
  qam64LowSe_tp = 4
}
 Modulation and Code Scheme table identifiers for PUSCH. More...
 
enum class  rnti_t : uint16_t {
  INVALID_RNTI = 0x0 , MIN_CRNTI = 0x1 , MAX_CRNTI = 0xffef , MIN_RESERVED_RNTI = 0xfff0 ,
  MAX_RESERVED_RNTI = 0xfffd , P_RNTI = 0xfffe , SI_RNTI = 0xffff
}
 
enum class  sib_type { sib1 = 1 , sib2 = 2 , sib19 = 19 , sib_invalid }
 
enum class  t_evaluation {
  s30 , s60 , s120 , s180 ,
  s240 , spare3 , spare2 , spare1
}
 
enum class  t_hyst_normal {
  s30 , s60 , s120 , s180 ,
  s240 , spare3 , spare2 , spare1
}
 
enum  du_ue_index_t : uint16_t { MIN_DU_UE_INDEX = 0 , MAX_DU_UE_INDEX = 1023 , MAX_NOF_DU_UES = 1024 , INVALID_DU_UE_INDEX = 1024 }
 Maximum number of UEs supported by DU (implementation-defined). More...
 
enum  du_cell_index_t : uint16_t { MIN_DU_CELL_INDEX = 0 , MAX_DU_CELL_INDEX = 15 , MAX_NOF_DU_CELLS = 16 , INVALID_DU_CELL_INDEX = MAX_NOF_DU_CELLS }
 Maximum number of cells supported by DU (implementation-defined). More...
 
enum  ue_cell_index_t : uint16_t { PCELL_INDEX = 0 , MAX_UE_SCELL_INDEX = 15 , MAX_NOF_SCELL_INDEXES = 16 , INVALID_UE_CELL_INDEX = MAX_NOF_SCELL_INDEXES }
 Maximum number of cells supported by a single UE. More...
 
enum  du_cell_group_index_t : uint16_t { MAX_DU_CELL_GROUPS = du_cell_index_t::MAX_NOF_DU_CELLS , INVALID_DU_CELL_GROUP_INDEX = MAX_DU_CELL_GROUPS }
 DU-specific index to group of cells that might be aggregated into a UE-specific CellGroup, if the UE is CA-capable. More...
 
enum class  duplex_mode {
  FDD = 0 , TDD , SDL , SUL ,
  INVALID
}
 NR Duplex mode. More...
 
enum class  timer_id_t : unsigned { invalid = std::numeric_limits<unsigned>::max() }
 Type used to represent a unique timer identifier. More...
 
enum class  nof_cyclic_shifts {
  no_cyclic_shift = 1 , two = 2 , three = 3 , four = 4 ,
  six = 6 , twelve = 12
}
 Options for the number of Initial Cyclic Shifts that can be set for PUCCH Format 1. More...
 
enum  coreset_id : uint8_t { MAX_CORESET_ID = 11 , MAX_NOF_CORESETS = 12 }
 CORESET identifier. This value is UE-specific, which means that a UE can have up to "maxNrofControlResourceSets" CORESETS configured. More...
 
enum class  pucch_group_hopping { NEITHER , ENABLE , DISABLE }
 Configuration of group and sequence hopping as described in TS38.331 PUCCH-ConfigCommon IE. More...
 
enum class  pucch_format {
  FORMAT_0 , FORMAT_1 , FORMAT_2 , FORMAT_3 ,
  FORMAT_4 , NOF_FORMATS
}
 PUCCH Formats as described in TS38.213 Section 9.2. More...
 
enum class  pucch_repetition_tx_slot { no_multi_slot , starts , continues , ends }
 
enum  scheduling_request_id : uint8_t { SR_ID_MIN = 0 , SR_ID_MAX = 7 }
 SchedulingRequestResourceId, as per TS 38.331. More...
 
enum class  sr_periodicity : int {
  sym_2 = -2 , sym_6_or_7 = -1 , sl_1 = 1 , sl_2 = 2 ,
  sl_4 = 4 , sl_5 = 5 , sl_8 = 8 , sl_10 = 10 ,
  sl_16 = 16 , sl_20 = 20 , sl_40 = 40 , sl_80 = 80 ,
  sl_160 = 160 , sl_320 = 320 , sl_640 = 640
}
 
enum class  sr_prohib_timer {
  ms1 , ms2 , ms4 , ms8 ,
  ms16 , ms32 , ms64 , ms128
}
 sr-ProhibitTimer possible values, for SchedulingRequestToAddMod, TS 38.331. More...
 
enum class  sr_max_tx {
  n4 = 4 , n8 = 8 , n16 = 16 , n32 = 32 ,
  n64 = 64
}
 sr-TransMax possible values, for SchedulingRequestToAddMod, TS 38.331. More...
 
enum class  ssb_coreset0_mplex_pattern { mplx_pattern1 = 0 , mplx_pattern2 , mplx_pattern3 , mplex_invalid }
 Refer to "SS/PBCH block and CORESET multiplexing pattern", TS 38.213, Section 13. More...
 
enum class  modulation_scheme {
  PI_2_BPSK = 0 , BPSK = 1 , QPSK = 2 , QAM16 = 4 ,
  QAM64 = 6 , QAM256 = MODULATION_MAX_BITS_PER_SYMBOL
}
 Modulation schemes as described in TS38.211 Section 5.1. More...
 
enum class  pdcp_rb_type { srb , drb }
 PDCP NR SRB or DRB information. More...
 
enum class  pdcp_rlc_mode { um , am }
 PDCP NR RLC mode information. More...
 
enum class  pdcp_sn_size : uint8_t { size12bits = 12 , size18bits = 18 }
 PDCP NR sequence number field. More...
 
enum class  pdcp_security_direction { uplink , downlink }
 PDCP security direction. More...
 
enum class  pdcp_discard_timer {
  ms10 = 10 , ms20 = 20 , ms30 = 30 , ms40 = 40 ,
  ms50 = 50 , ms60 = 60 , ms75 = 75 , ms100 = 100 ,
  ms150 = 150 , ms200 = 200 , ms250 = 250 , ms300 = 300 ,
  ms500 = 500 , ms750 = 750 , ms1500 = 1500 , infinity = -1
}
 
enum class  rlc_mode {
  tm , um_bidir , um_unidir_ul , um_unidir_dl ,
  am
}
 RLC NR modes. More...
 
enum class  rlc_um_sn_size : uint16_t { size6bits = 6 , size12bits = 12 }
 RLC UM NR sequence number field. More...
 
enum class  rlc_am_sn_size : uint16_t { size12bits = 12 , size18bits = 18 }
 RLC AM NR sequence number field. More...
 
enum class  rlc_t_reassembly {
  ms0 = 0 , ms5 = 5 , ms10 = 10 , ms15 = 15 ,
  ms20 = 20 , ms25 = 25 , ms30 = 30 , ms35 = 35 ,
  ms40 = 40 , ms45 = 45 , ms50 = 50 , ms55 = 55 ,
  ms60 = 60 , ms65 = 65 , ms70 = 70 , ms75 = 75 ,
  ms80 = 80 , ms85 = 85 , ms90 = 90 , ms95 = 95 ,
  ms100 = 100 , ms110 = 110 , ms120 = 120 , ms130 = 130 ,
  ms140 = 140 , ms150 = 150 , ms160 = 160 , ms170 = 170 ,
  ms180 = 180 , ms190 = 190 , ms200 = 200
}
 Converts sequence number field to numeric its value. More...
 
enum class  rlc_t_poll_retransmit {
  ms5 = 5 , ms10 = 10 , ms15 = 15 , ms20 = 20 ,
  ms25 = 25 , ms30 = 30 , ms35 = 35 , ms40 = 40 ,
  ms45 = 45 , ms50 = 50 , ms55 = 55 , ms60 = 60 ,
  ms65 = 65 , ms70 = 70 , ms75 = 75 , ms80 = 80 ,
  ms85 = 85 , ms90 = 90 , ms95 = 95 , ms100 = 100 ,
  ms105 = 105 , ms110 = 110 , ms115 = 115 , ms120 = 120 ,
  ms125 = 125 , ms130 = 130 , ms135 = 135 , ms140 = 140 ,
  ms145 = 145 , ms150 = 150 , ms155 = 155 , ms160 = 160 ,
  ms165 = 165 , ms170 = 170 , ms175 = 175 , ms180 = 180 ,
  ms185 = 185 , ms190 = 190 , ms195 = 195 , ms200 = 200 ,
  ms205 = 205 , ms210 = 210 , ms215 = 215 , ms220 = 220 ,
  ms225 = 225 , ms230 = 230 , ms235 = 235 , ms240 = 240 ,
  ms245 = 245 , ms250 = 250 , ms300 = 300 , ms350 = 350 ,
  ms400 = 400 , ms450 = 450 , ms500 = 500 , ms800 = 800 ,
  ms1000 = 1000 , ms2000 = 2000 , ms4000 = 4000
}
 
enum class  rlc_max_retx_threshold {
  t1 = 1 , t2 = 2 , t3 = 3 , t4 = 4 ,
  t6 = 6 , t8 = 8 , t16 = 16 , t32 = 32
}
 
enum class  rlc_poll_pdu {
  p4 = 4 , p8 = 8 , p16 = 16 , p32 = 32 ,
  p64 = 64 , p128 = 128 , p256 = 256 , p512 = 512 ,
  p1024 = 1024 , p2048 = 2048 , p4096 = 4096 , p6144 = 6144 ,
  p8192 = 8192 , p12288 = 12288 , p16384 = 16384 , p20480 = 20480 ,
  p24576 = 24576 , p28672 = 28672 , p32768 = 32768 , p40960 = 40960 ,
  p49152 = 49152 , p57344 = 57344 , p65536 = 65536 , infinity = -1
}
 
enum class  rlc_poll_kilo_bytes {
  kB1 = 1 , kB2 = 2 , kB5 = 5 , kB8 = 8 ,
  kB10 = 10 , kB15 = 15 , kB25 = 25 , kB50 = 50 ,
  kB75 = 75 , kB100 = 100 , kB125 = 125 , kB250 = 250 ,
  kB375 = 375 , kB500 = 500 , kB750 = 750 , kB1000 = 1000 ,
  kB1250 = 1250 , kB1500 = 1500 , kB2000 = 2000 , kB3000 = 3000 ,
  kB4000 = 4000 , kB4500 = 4500 , kB5000 = 5000 , kB5500 = 5500 ,
  kB6000 = 6000 , kB6500 = 6500 , kB7000 = 7000 , kB7500 = 7500 ,
  mB8 = 8000 , mB9 = 9000 , mB10 = 10000 , mB11 = 11000 ,
  mB12 = 12000 , mB13 = 13000 , mB14 = 14000 , mB15 = 15000 ,
  mB16 = 16000 , mB17 = 17000 , mB18 = 18000 , mB20 = 20000 ,
  mB25 = 25000 , mB30 = 30000 , mB40 = 40000 , infinity = -1
}
 
enum class  rlc_t_status_prohibit {
  ms0 = 0 , ms5 = 5 , ms10 = 10 , ms15 = 15 ,
  ms20 = 20 , ms25 = 25 , ms30 = 30 , ms35 = 35 ,
  ms40 = 40 , ms45 = 45 , ms50 = 50 , ms55 = 55 ,
  ms60 = 60 , ms65 = 65 , ms70 = 70 , ms75 = 75 ,
  ms80 = 80 , ms85 = 85 , ms90 = 90 , ms95 = 95 ,
  ms100 = 100 , ms105 = 105 , ms110 = 110 , ms115 = 115 ,
  ms120 = 120 , ms125 = 125 , ms130 = 130 , ms135 = 135 ,
  ms140 = 140 , ms145 = 145 , ms150 = 150 , ms155 = 155 ,
  ms160 = 160 , ms165 = 165 , ms170 = 170 , ms175 = 175 ,
  ms180 = 180 , ms185 = 185 , ms190 = 190 , ms195 = 195 ,
  ms200 = 200 , ms205 = 205 , ms210 = 210 , ms215 = 215 ,
  ms220 = 220 , ms225 = 225 , ms230 = 230 , ms235 = 235 ,
  ms240 = 240 , ms245 = 245 , ms250 = 250 , ms300 = 300 ,
  ms350 = 350 , ms400 = 400 , ms450 = 450 , ms500 = 500 ,
  ms800 = 800 , ms1000 = 1000 , ms1200 = 1200 , ms1600 = 1600 ,
  ms2000 = 2000 , ms2400 = 2400
}
 
enum class  rlc_dc_field : unsigned { control = 0b00 , data = 0b01 }
 RLC AM NR segmentation info. More...
 
enum class  rlc_si_field : unsigned { full_sdu = 0b00 , first_segment = 0b01 , last_segment = 0b10 , middle_segment = 0b11 }
 RLC AM NR segmentation info. More...
 
enum class  rlc_control_pdu_type : unsigned { status_pdu = 0b000 }
 
enum class  bsr_format { SHORT_BSR , LONG_BSR , SHORT_TRUNC_BSR , LONG_TRUNC_BSR }
 TS 38.321, 6.1.3.1 - Buffer Status Report MAC CEs. More...
 
enum class  periodic_bsr_timer {
  sf1 = 1 , sf5 = 5 , sf10 = 10 , sf16 = 16 ,
  sf20 = 20 , sf32 = 32 , sf40 = 40 , sf64 = 64 ,
  sf80 = 80 , sf128 = 128 , sf160 = 160 , sf320 = 320 ,
  sf640 = 640 , sf1280 = 1280 , sf2560 = 2560 , infinity = 0
}
 periodicBSR-Timer, as part of BSR-Config, TS 38.331. More...
 
enum class  retx_bsr_timer {
  sf10 = 10 , sf20 = 20 , sf40 = 40 , sf80 = 80 ,
  sf160 = 160 , sf320 = 320 , sf640 = 640 , sf1280 = 1280 ,
  sf2560 = 2560 , sf5120 = 5120 , sf10240 = 10240
}
 retxBSR-Timer, as part of BSR-Config, TS 38.331. More...
 
enum class  logical_channel_sr_delay_timer {
  sf20 = 20 , sf40 = 40 , sf64 = 64 , sf128 = 128 ,
  sf512 = 512 , sf1024 = 1024 , sf2560 = 2560
}
 logicalChannelSR-DelayTimer, as part of BSR-Config, TS 38.331. More...
 
enum class  phr_periodic_timer {
  sf10 = 10 , sf20 = 20 , sf50 = 50 , sf100 = 100 ,
  sf200 = 200 , sf500 = 500 , sf1000 = 1000 , infinity = 0
}
 phr-PeriodicTimer, in PHR-Config, TS 38.331. More...
 
enum class  phr_prohibit_timer {
  sf0 = 0 , sf10 = 10 , sf20 = 20 , sf50 = 50 ,
  sf100 = 100 , sf200 = 200 , sf500 = 500 , sf1000 = 1000
}
 phr-ProhibitTimer, in PHR-Config, TS 38.331. More...
 
enum class  phr_tx_power_factor_change { db1 = 1 , db3 = 3 , db6 = 6 , infinity = 0 }
 phr-Tx-PowerFactorChange, in PHR-Config, TS 38.331. More...
 
enum class  phr_mode_other_cg { real , virtual_ }
 phr-ModeOtherCG, in PHR-Config, TS 38.331. More...
 
enum  ssb_id_t : uint8_t { MIN_SSB_ID = 0 , MAX_SSB_ID = 63 , MAX_NOF_SSB_RESOURCES = 64 }
 
enum  bwp_id_t : uint8_t { MIN_BWP_ID = 0 , MAX_BWP_ID = 3 , MAX_NOF_BWPS = 4 }
 
enum class  sch_mapping_type { typeA , typeB }
 Physical shared channels Mapping Type. More...
 
enum class  x_overhead { not_set = 0 , xoh6 = 6 , xoh12 = 12 , xoh18 = 18 }
 xOverhead options, as per TS 38.331. Used in PDSCH-ServingCellConfig and PUSCH-ServingCellConfig. More...
 
enum  serv_cell_index_t : uint8_t {
  SERVING_CELL_PCELL_IDX = 0 , MAX_SERVING_CELL_IDX = 31 , MAX_NOF_SCELLS = 31 , MAX_NOF_SERVING_CELLS = 32 ,
  SERVING_CELL_INVALID = MAX_NOF_SERVING_CELLS
}
 
enum class  pdcp_t_reordering {
  ms0 = 0 , ms1 = 1 , ms2 = 2 , ms4 = 4 ,
  ms5 = 5 , ms8 = 8 , ms10 = 10 , ms15 = 15 ,
  ms20 = 20 , ms30 = 30 , ms40 = 40 , ms50 = 50 ,
  ms60 = 60 , ms80 = 80 , ms100 = 100 , ms120 = 120 ,
  ms140 = 140 , ms160 = 160 , ms180 = 180 , ms200 = 200 ,
  ms220 = 220 , ms240 = 240 , ms260 = 260 , ms280 = 280 ,
  ms300 = 300 , ms500 = 500 , ms750 = 750 , ms1000 = 1000 ,
  ms1250 = 1250 , ms1500 = 1500 , ms1750 = 1750 , ms2000 = 2000 ,
  ms2250 = 2250 , ms2500 = 2500 , ms2750 = 2750 , ms3000 = 3000 ,
  infinity = -1
}
 PDCP NR t-Reordering timer values. This timer is used to detect loss of PDCP Data PDUs. See TS 38.322 for timer description and TS 38.331 for valid timer durations. More...
 
enum class  cause_radio_network_t : uint8_t {
  unspecified = 0 , txnrelocoverall_expiry , successful_ho , release_due_to_ngran_generated_reason ,
  release_due_to_5gc_generated_reason , ho_cancelled , partial_ho , ho_fail_in_target_5_gc_ngran_node_or_target_sys ,
  ho_target_not_allowed , tngrelocoverall_expiry , tngrelocprep_expiry , cell_not_available ,
  unknown_target_id , no_radio_res_available_in_target_cell , unknown_local_ue_ngap_id , inconsistent_remote_ue_ngap_id ,
  ho_desirable_for_radio_reason , time_crit_ho , res_optim_ho , reduce_load_in_serving_cell ,
  user_inactivity , radio_conn_with_ue_lost , radio_res_not_available , invalid_qos_combination ,
  fail_in_radio_interface_proc , interaction_with_other_proc , unknown_pdu_session_id , unkown_qos_flow_id ,
  multiple_pdu_session_id_instances , multiple_qos_flow_id_instances , encryption_and_or_integrity_protection_algorithms_not_supported , ng_intra_sys_ho_triggered ,
  ng_inter_sys_ho_triggered , xn_ho_triggered , not_supported_5qi_value , ue_context_transfer ,
  ims_voice_eps_fallback_or_rat_fallback_triggered , up_integrity_protection_not_possible , up_confidentiality_protection_not_possible , slice_not_supported ,
  ue_in_rrc_inactive_state_not_reachable , redirection , res_not_available_for_the_slice , ue_max_integrity_protected_data_rate_reason ,
  release_due_to_cn_detected_mob
}
 
enum class  cause_transport_t : uint8_t { transport_res_unavailable = 0 , unspecified }
 
enum class  cause_nas_t : uint8_t { normal_release = 0 , authentication_fail , deregister , unspecified }
 
enum class  cause_protocol_t : uint8_t {
  transfer_syntax_error = 0 , abstract_syntax_error_reject , abstract_syntax_error_ignore_and_notify , msg_not_compatible_with_receiver_state ,
  semantic_error , abstract_syntax_error_falsely_constructed_msg , unspecified
}
 
enum class  cause_misc_t : uint8_t {
  ctrl_processing_overload = 0 , not_enough_user_plane_processing_res , hardware_fail , om_intervention ,
  unknown_plmn_or_sn_pn , unspecified
}
 
enum class  establishment_cause_t : uint8_t {
  emergency = 0 , high_prio_access , mt_access , mo_sig ,
  mo_data , mo_voice_call , mo_video_call , mo_sms ,
  mps_prio_access , mcs_prio_access
}
 
enum class  pdu_session_id_t : uint16_t { min = 0 , max = MAX_NOF_PDU_SESSIONS - 1 , invalid = MAX_NOF_PDU_SESSIONS }
 PDU Session ID. More...
 
enum class  qos_flow_id_t : uint8_t { min = 0 , max = MAX_NOF_QOS_FLOWS - 1 , invalid = MAX_NOF_QOS_FLOWS }
 QoS Flow ID. More...
 
enum class  ran_ue_id_t : uint64_t { min = 0 , max = MAX_NOF_RAN_UES - 1 , invalid = 0x1ffffffff }
 
enum class  integrity_protection_result_t { performed , not_performed }
 
enum class  confidentiality_protection_result_t { performed , not_performed }
 
enum class  integrity_protection_indication_t { required , preferred , not_needed }
 
enum class  confidentiality_protection_indication_t { required , preferred , not_needed }
 
enum class  activity_notification_level_t : uint8_t { ue = 0 , pdu_session = 1 , drb = 2 , invalid = 3 }
 
enum class  gnb_du_id_t : uint64_t { min = 0 , max = 68719476735 , invalid = max + 1 }
 Global NodeB DU ID as per TS 38.473. More...
 
enum class  prioritized_bit_rate {
  kBps0 = 0 , kBps8 = 8 , kBps16 = 16 , kBps32 = 32 ,
  kBps64 = 64 , kBps128 = 128 , kBps256 = 256 , kBps512 = 512 ,
  kBps1024 = 1024 , kBps2048 = 2048 , kBps4096 = 4096 , kBps8192 = 8192 ,
  kBps16384 = 16384 , kBps32768 = 32768 , kBps65536 = 65536 , infinity = 65537
}
 Prioritized Bit rate value in kiloBytes/s. See TS 38.331, prioritisedBitRate. More...
 
enum class  bucket_size_duration {
  ms5 = 5 , ms10 = 10 , ms20 = 20 , ms50 = 50 ,
  ms100 = 100 , ms150 = 150 , ms300 = 300 , ms500 = 500 ,
  ms1000 = 1000 , spare7 = 1007 , spare6 = 1006 , spare5 = 1005 ,
  spare4 = 1004 , spare3 = 1003 , spare2 = 1002 , spare1 = 1001
}
 Bucket size duration in milliseconds. See TS 38.331, bucketSizeDuration. More...
 
enum class  mac_pcap_type { udp , dlt }
 
enum class  aggregation_level : uint8_t {
  n1 = 0 , n2 , n4 , n8 ,
  n16
}
 Aggregation Level of PDCCH allocation. More...
 
enum class  sib1_rtx_periodicity {
  ms5 = 5 , ms10 = 10 , ms20 = 20 , ms40 = 40 ,
  ms80 = 80 , ms160 = 160
}
 SIB retransmission periodicity in milliseconds as per TS38.331 Section 5.2.1. More...
 
enum class  crc_generator_poly {
  CRC24A , CRC24B , CRC24C , CRC16 ,
  CRC11 , CRC6
}
 CRC cyclic generator polynomials identifiers. More...
 
enum class  polar_interleaver_direction { tx , rx }
 
enum class  port_channel_estimator_fd_smoothing_strategy { none = 0 , mean , filter }
 Port channel estimator frequency domain smoothing strategy. More...
 
enum class  lower_phy_baseband_buffer_size_policy : unsigned { slot = 0 , half_slot , single_packet , optimal_slot }
 Lower physical layer baseband gateway buffer size policy. More...
 
enum class  protocol_transaction_failure { timeout , cancel , abnormal }
 Error causes for the case of transactions that timed out or were cancelled. More...
 
enum class  ldpc_base_graph_type : uint8_t { BG1 = 1 , BG2 = 2 }
 LDPC Base graph types. More...
 
enum  lcg_id_t : uint8_t { MAX_LCG_ID = 7 , MAX_NOF_LCGS = 8 , LCG_ID_INVALID = 8 }
 Logical Channel Group as per TS38.331. More...
 
enum  tag_id_t { MAX_TAG_ID = 3 , INVALID_TAG_ID = MAX_NOF_TAGS }
 TAG-Id, TS 38.331. More...
 
enum class  time_alignment_timer {
  ms500 = 500 , ms750 = 750 , ms1280 = 1280 , ms1920 = 1920 ,
  ms2560 = 2560 , ms5120 = 5120 , ms10240 = 10240 , infinity = 0
}
 TimeAlignmentTimer, TS 38.331. More...
 
enum class  csi_resource_periodicity {
  slots4 = 4 , slots5 = 5 , slots8 = 8 , slots10 = 10 ,
  slots16 = 16 , slots20 = 20 , slots32 = 32 , slots40 = 40 ,
  slots64 = 64 , slots80 = 80 , slots160 = 160 , slots320 = 320 ,
  slots640 = 640
}
 
enum  rate_match_pattern_id_t : uint8_t { MIN_RATE_MATCH_PATTERN_ID = 0 , MAX_RATE_MATCH_PATTERN_ID = 3 , MAX_NOF_RATE_MATCH_PATTERNS = 4 }
 Rate matching pattern id used to identify a Rate matching pattern configuration. More...
 
enum  p0_pusch_alphaset_id : uint8_t { MIN_P0_PUSCH_ALPHASET_ID = 0 , MAX_P0_PUSCH_ALPHASET_ID = 29 , MAX_NOF_P0_PUSCH_ALPHASETS = 30 }
 
enum  tci_state_id_t : uint8_t { MIN_TCI_STATE_ID = 0 , MAX_TCI_STATE_ID = 127 , MAX_NOF_TCI_STATES = 128 }
 TCI-State id used to identify a TCI-State configuration. More...
 
enum class  qos_prio_level_t : uint8_t { min = 0 , max = MAX_QOS_PRIO_LEVEL , invalid = MAX_QOS_PRIO_LEVEL + 1 }
 QoS Priority Level. More...
 
enum class  sdap_hdr_ul_cfg { present = 0 , absent }
 SDAP header options for UL. More...
 
enum class  sdap_hdr_dl_cfg { present = 0 , absent }
 SDAP header options for DL. More...
 
enum class  cu_up_cn_support_t { c_epc = 0 , c_5gc , both }
 
enum class  gnb_cu_ue_f1ap_id_t : uint64_t { min = 0 , max = MAX_NOF_CU_F1AP_UES - 1 , invalid = 0x1ffffffff }
 
enum class  gnb_du_ue_f1ap_id_t : uint64_t { min = 0 , max = MAX_NOF_DU_F1AP_UES - 1 , invalid = 0x1ffffffff }
 
enum class  gnb_cu_cp_ue_e1ap_id_t : uint64_t { min = 0 , max = MAX_NOF_CU_CP_E1AP_UES - 1 , invalid = 0x1ffffffff }
 
enum class  gnb_cu_up_ue_e1ap_id_t : uint64_t { min = 0 , max = MAX_NOF_CU_CP_E1AP_UES - 1 , invalid = 0x1ffffffff }
 
enum class  resource_allocation { resource_allocation_type_0 , resource_allocation_type_1 , dynamic_switch }
 Resource allocation type for DCI formats 0_1 and 1_1. More...
 
enum class  dynamic_resource_allocation { type_0 , type_1 }
 Dynamic resource allocation indicator for DCI formats 0_1 and 1_1. More...
 
enum class  tx_scheme_codebook_subset : unsigned { fully_and_partial_and_non_coherent , partial_and_non_coherent , non_coherent }
 Subset of PMIs addressed by TPMI, where PMIs are those supported by UEs with maximum coherence capabilities. More...
 
enum class  rbg_size { config1 , config2 }
 RBG size types for PDSCH. More...
 
enum class  nominal_rbg_size : unsigned { P2 = 2 , P4 = 4 , P8 = 8 , P16 = 16 }
 
enum  csi_report_config_id_t : uint8_t { MIN_CSI_REPORT_CONFIG_ID = 0 , MAX_CSI_REPORT_CONFIG_ID = 47 , MAX_NOF_CSI_REPORT_CONFIGS = 48 }
 CSI-ReportConfigId is used to identify one CSI-ReportConfig. More...
 
enum class  csi_report_periodicity {
  slots4 = 4 , slots5 = 5 , slots8 = 8 , slots10 = 10 ,
  slots16 = 16 , slots20 = 20 , slots40 = 40 , slots80 = 80 ,
  slots160 = 160 , slots320 = 320
}
 Periodicity and slot offset. More...
 
enum class  cqi_table_t { table1 , table2 , table3 , table4 }
 CQI table to use for CQI calculation. More...
 
enum  csi_res_config_id_t : uint8_t { MIN_CSI_RESOURCE_CONFIG_ID = 0 , MAX_CSI_RESOURCE_CONFIG_ID = 111 , MAX_NOF_CSI_RESOURCE_CONFIGS = 112 }
 CSI-ResourceConfigId is used to identify a CSI-ResourceConfig. More...
 
enum  nzp_csi_rs_res_id_t : uint8_t { MIN_NZP_CSI_RS_RESOURCE_ID = 0 , MAX_NZP_CSI_RS_RESOURCE_ID = 191 , MAX_NOF_NZP_CSI_RS_RESOURCES = 192 }
 NZP-CSI-RS-ResourceId is used to identify one NZP-CSI-RS-Resource. More...
 
enum  nzp_csi_rs_res_set_id_t : uint8_t { MIN_NZP_CSI_RS_RESOURCE_SET_ID = 0 , MAX_NZP_CSI_RS_RESOURCE_SET_ID = 63 , MAX_NOF_NZP_CSI_RS_RESOURCE_SETS = 64 , MAX_NOF_NZP_CSI_RS_RESOURCES_PER_SET = 16 }
 NZP-CSI-RS-ResourceSetId is used to identify one NZP-CSI-RS-ResourceSet. More...
 
enum  csi_im_res_id_t : uint8_t { MIN_CSI_IM_RESOURCE_ID = 0 , MAX_CSI_IM_RESOURCE_ID = 31 , MAX_NOF_CSI_IM_RESOURCES = 32 }
 CSI-IM-ResourceId is used to identify one CSI-IM-Resource. More...
 
enum  csi_im_res_set_id_t : uint8_t { MIN_CSI_IM_RESOURCE_SET_ID = 0 , MAX_CSI_IM_RESOURCE_SET_ID = 63 , MAX_NOF_CSI_IM_RESOURCE_SETS = 64 , MAX_NOF_CSI_IM_RESOURCES_PER_SET = 8 }
 CSI-IM-ResourceSetId is used to identify CSI-IM-ResourceSets. More...
 
enum  csi_ssb_res_set_id_t { MIN_CSI_SSB_RESOURCE_SET_ID = 0 , MAX_CSI_SSB_RESOURCE_SET_ID = 63 , MAX_NOF_CSI_SSB_RESOURCE_SETS = 64 , MAX_NOF_CSI_SSB_RESOURCES_PER_SET = 64 }
 CSI-SSB-ResourceSetId is used to identify one SS/PBCH block resource set. More...
 
enum  zp_csi_rs_res_id_t : uint8_t { MIN_ZP_CSI_RS_RESOURCE_ID = 0 , MAX_ZP_CSI_RS_RESOURCE_ID = 31 , MAX_NOF_ZP_CSI_RS_RESOURCES = 32 }
 ZP-CSI-ResourceId is used to identify one ZP-CSI-Resource. More...
 
enum  zp_csi_rs_res_set_id_t : uint8_t { MIN_ZP_CSI_RS_RESOURCE_SET_ID = 0 , MAX_ZP_CSI_RS_RESOURCE_SET_ID = 15 , MAX_NOF_ZP_CSI_RS_RESOURCE_SETS = 16 }
 ZP-CSI-ResourceSetId is used to identify one ZP-CSI-ResourceSet. More...
 
enum class  csi_rs_type : uint8_t { TRS , CSI_RS_NZP , CSI_RS_ZP }
 CSI-RS types. More...
 
enum class  csi_rs_cdm_type { no_CDM = 0 , fd_CDM2 , cdm4_FD2_TD2 , cdm8_FD2_TD4 }
 Code-Division Multiplexing (CDM) strategies for CSI-RS. More...
 
enum class  csi_rs_freq_density_type { dot5_even_RB = 0 , dot5_odd_RB , one , three }
 Strategies regarding Resource Element (RE) density in the frequency domain for CSI-RS signals. More...
 
enum class  alpha : unsigned {
  alpha0 , alpha04 , alpha05 , alpha06 ,
  alpha07 , alpha08 , alpha09 , alpha1 ,
  not_set
}
 
enum class  alpha_scaling_opt { f0p5 , f0p65 , f0p8 , f1 }
 scaling values options, part of UCI-OnPUSCH, part of PUSCH-Config, as per TS 38.331. More...
 
enum class  pdsch_harq_ack_codebook { semistatic , dynamic }
 Options for pdsch-HARQ-ACK-Codebook, in PhysicalCellGroupConfig, TS 38.331. More...
 
enum  harq_id_t : uint8_t { MAX_HARQ_ID = 15 , MAX_NOF_HARQS = 16 , INVALID_HARQ_ID = 16 }
 Identification of an HARQ process. More...
 
enum class  mac_harq_ack_report_status { nack = 0 , ack , dtx }
 Outcomes of a HARQ-ACK report. More...
 
enum class  uci_pucch_f0_or_f1_harq_values { nack , ack , dtx }
 HARQ values for UCI PUCCH Format 0 or Format 1. More...
 
enum class  uci_pusch_or_pucch_f2_3_4_detection_status {
  crc_pass = 1 , crc_failure , dtx , no_dtx ,
  dtx_not_checked
}
 Indicates CRC result on UCI containing HARQ/CSI Part 1/CSI Part 2 data. More...
 
enum class  dci_dl_format { f1_0 , f1_1 , f2_0 }
 
enum class  dci_ul_format { f0_0 , f0_1 }
 
enum class  dci_dl_rnti_config_type {
  si_f1_0 , ra_f1_0 , c_rnti_f1_0 , tc_rnti_f1_0 ,
  p_rnti_f1_0 , c_rnti_f1_1
}
 Defines which fields are stored in the DCI payload, based on the chosen DCI format and RNTI type. More...
 
enum class  dci_ul_rnti_config_type { tc_rnti_f0_0 , c_rnti_f0_0 , c_rnti_f0_1 }
 Defines which fields are stored in the DCI payload, based on the chosen DCI format and RNTI type. More...
 
enum class  pmi_codebook_type { one = 0 , two , typeI_single_panel_4ports_mode1 , other }
 CSI-RS PMI report codebook configuration. More...
 
enum class  csi_report_quantities { cri_ri_pmi_cqi = 0 , cri_ri_cqi , cri_ri_li_pmi_cqi , other }
 CSI report quantities. More...
 
enum class  sr_nof_bits : unsigned {
  no_sr = 0 , one , two , three ,
  four
}
 
enum class  pucch_format_4_sf { sf2 , sf4 }
 PUCCH Format 4 spreading factor. More...
 
enum class  polar_code_ibil { not_present , present }
 Labels for the internal bit interleaver. More...
 
enum class  uci_status { unknown = 0 , valid , invalid }
 Labels for the UCI decoding/detection status, common for both PUCCH and PUSCH UCI. More...
 
enum class  paging_identity_type { ran_ue_paging_identity , cn_ue_paging_identity }
 Type of Paging. RAN initiated or CN initiated. More...
 
enum  e2sm_service_model_t { KPM , RC , UNKNOWN_SM }
 
enum  e2sm_kpm_metric_level_enum {
  E2_NODE_LEVEL = 0x01 , UE_LEVEL = 0x02 , QOS_FLOW_LEVEL = 0x04 , ALL_LEVELS = 0x07 ,
  UNKNOWN_LEVEL = 0x10
}
 
enum  e2sm_kpm_label_enum {
  NO_LABEL = 0x00000001 , PLMN_ID_LABEL = 0x00000002 , SLICE_ID_LABEL = 0x00000004 , FIVE_QI_LABEL = 0x00000008 ,
  QFI_LABEL = 0x00000010 , QCI_LABEL = 0x00000020 , QCI_MAX_LABEL = 0x00000040 , QCI_MIN_LABEL = 0x00000080 ,
  ARP_MAX_LABEL = 0x00000100 , ARP_MIN_LABEL = 0x00000200 , BITRATE_RANGE_LABEL = 0x00000400 , LAYER_MU_MIMO_LABEL = 0x00000800 ,
  SUM_LABEL = 0x00001000 , DIST_BIN_X_LABEL = 0x00002000 , DIST_BIN_Y_LABEL = 0x00004000 , DIST_BIN_Z_LABEL = 0x00008000 ,
  PRE_LABEL_OVERRIDE_LABEL = 0x00010000 , START_END_IND_LABEL = 0x00020000 , MIN_LABEL = 0x00040000 , MAX_LABEL = 0x00080000 ,
  AVG_LABEL = 0x00100000 , SSB_IDX_LABEL = 0x00200000 , NON_GO_B_BFMODE_IDX_LABEL = 0x00400000 , MIMO_MODE_IDX_LABEL = 0x00800000 ,
  ALL_VALUE_TYPE_LABELS = 0x001c1000 , ALL_SUBCOUNTER_LABELS = 0x00e3effe , ALL_LABELS = 0x00ffffff , UNKNOWN_LABEL = 0x10000000
}
 
enum  e2sm_kpm_collection_method_t {
  CC = 1 , GAUGE = 2 , DER = 3 , SI = 4 ,
  OM = 5
}
 
enum  e2sm_kpm_measurement_object_t {
  E2_Node = 0x0001 , GNBCUUP = 0x0002 , NRCellCU = 0x0004 , NRCellDU = 0x0008 ,
  NRCellRelation = 0x0010 , EutranRelation = 0x0020 , BEAM = 0x0040 , EP_F1U = 0x0080 ,
  EP_XnU = 0x0100 , EP_X2U = 0x0200 , ANY = 0xffff
}
 
enum  e2sm_kpm_metric_dtype_t { INTEGER , REAL }
 
enum class  gtpu_extension_header_type : uint8_t {
  no_more_extension_headers = 0b00000000 , reserved_0 = 0b00000001 , reserved_1 = 0b00000010 , long_pdcp_pdu_number_0 = 0b00000011 ,
  service_class_indicator = 0b00100000 , udp_port = 0b01000000 , ran_container = 0b10000001 , long_pdcp_pdu_number_1 = 0b10000010 ,
  xw_ran_container = 0b10000011 , nr_ran_container = 0b10000100 , pdu_session_container = 0b10000101 , pdcp_pdu_number = 0b11000000 ,
  reserved_2 = 0b11000001 , reserved_3 = 0b11000010
}
 
enum class  gtpu_comprehension : uint8_t { not_required_intermediate_node_forward = 0b00000000 , not_required_intermediate_node_discard = 0b00000001 , required_at_endpoint_not_intermediate_node = 0b00000010 , required_at_endpoint_and_intermediate_node = 0b00000011 }
 
enum class  gtpu_information_element_type : uint8_t {
  recovery = 14 , tunnel_endpoint_identifier_data_i = 16 , gsn_address = 133 , extension_header_type_list = 141 ,
  private_extension = 255
}
 
enum class  ph_field_type_t { type1 , type2 , type3 }
 Type of PH field reported by UE. More...
 
enum class  pdcp_dc_field : unsigned { control = 0b00 , data = 0b01 }
 
enum class  pdcp_control_pdu_type : unsigned { status_report = 0b000 , interspersed_rohc_feedback = 0b001 , ehc_feedback = 0b010 }
 
enum class  fftw_plan_optimization : unsigned { fftw_estimate = FFTW_ESTIMATE , fftw_measure = FFTW_MEASURE , fftw_exhaustive = FFTW_EXHAUSTIVE }
 FFTW optimization flags. More...
 
enum class  resource_grid_dimensions : unsigned { subc = 0 , symbol = 1 , port = 2 , all = 3 }
 Dimension, i.e. number of coordinates, of each indexing level of the resource grid. More...
 
enum class  rx_buffer_status : uint8_t { successful = 0 , already_in_use , insufficient_cb }
 
enum class  alloc_outcome { success , skip_slot , skip_ue , invalid_params }
 Outcome of a UE grant allocation, and action for the scheduler policy to follow afterwards. More...
 
enum class  psup_pdu_type : uint8_t { dl_pdu_session_information = 0 , ul_pdu_session_information = 1 }
 
enum class  psup_ppi : uint8_t { min = 0 , max = MAX_NOF_PPI - 1 , invalid = MAX_NOF_PPI }
 
enum class  openmode { read_only , write_only , read_write }
 file_vector open modes. More...
 

Functions

std::unique_ptr< fapi_adaptor::phy_fapi_adaptorbuild_phy_fapi_adaptor (unsigned sector_id, subcarrier_spacing scs, subcarrier_spacing scs_common, downlink_processor_pool &dl_processor_pool, resource_grid_pool &dl_rg_pool, uplink_request_processor &ul_request_processor, resource_grid_pool &ul_rg_pool, uplink_slot_pdu_repository &ul_pdu_repository, const downlink_pdu_validator &dl_pdu_validator, const uplink_pdu_validator &ul_pdu_validator, const fapi::prach_config &prach_cfg, const fapi::carrier_config &carrier_cfg, std::unique_ptr< fapi_adaptor::precoding_matrix_repository > pm_repo, std::unique_ptr< fapi_adaptor::uci_part2_correspondence_repository > part2_repo, std::vector< uint8_t > prach_ports)
 
std::unique_ptr< fapi_adaptor::mac_fapi_adaptorbuild_mac_fapi_adaptor (unsigned sector_id, subcarrier_spacing scs, fapi::slot_message_gateway &gateway, fapi::slot_last_message_notifier &last_msg_notifier, std::unique_ptr< fapi_adaptor::precoding_matrix_mapper > pm_mapper, std::unique_ptr< fapi_adaptor::uci_part2_correspondence_mapper > part2_mapper, unsigned cell_nof_prbs)
 
std::unique_ptr< upper_phycreate_upper_phy (const upper_phy_params &params, upper_phy_rg_gateway *rg_gateway, span< task_executor * > dl_executors, task_executor *ul_executor, upper_phy_rx_symbol_request_notifier *rx_symbol_request_notifier)
 
std::unique_ptr< du_highmake_du_high (const srs_du::du_high_configuration &du_hi_cfg)
 Create a DU-high instance, which comprises MAC, RLC and F1 layers.
 
std::unique_ptr< radio_unitcreate_generic_ru (ru_generic_configuration &config)
 Returns a generic Radio Unit using the given configuration.
 
template<concurrent_queue_policy QueuePolicy, concurrent_queue_wait_policy WaitPolicy>
general_task_worker_executor< QueuePolicy, WaitPolicymake_task_executor (general_task_worker< QueuePolicy, WaitPolicy > &w)
 
template<concurrent_queue_policy QueuePolicy, concurrent_queue_wait_policy WaitPolicy>
std::unique_ptr< task_executormake_task_executor_ptr (general_task_worker< QueuePolicy, WaitPolicy > &w)
 
constexpr bool is_scs_valid (subcarrier_spacing scs)
 Check if SCS value is valid.
 
constexpr bool is_scs_valid (subcarrier_spacing scs, frequency_range fr)
 Checks whether the provided SCS–FR pair is valid.
 
constexpr unsigned to_numerology_value (subcarrier_spacing scs)
 Convert SCS to numerology index ( $\mu$).
 
constexpr unsigned scs_to_khz (subcarrier_spacing scs)
 Converts SCS into integer in kHz.
 
constexpr subcarrier_spacing to_subcarrier_spacing (unsigned numerology)
 Convert numerology index ( $\mu$) to SCS.
 
subcarrier_spacing to_subcarrier_spacing (const std::string &str)
 Convert a string to SCS.
 
const charto_string (subcarrier_spacing scs)
 Convert SCS to string.
 
constexpr unsigned get_nof_slots_per_subframe (subcarrier_spacing scs)
 Calculates number of slots per subframe.
 
template<typename... Args>
bool srsran_terminate (const char *fmt, Args &&... args) noexcept
 Command to terminate application with an error message, ensuring first that the log is flushed. Attribute noinline is used to signal to the compiler that this path should rarely occur and therefore doesn't need to get optimized.
 
template<typename... Args>
void report_error (const char *reason_fmt, Args &&... args) noexcept
 Reports an error and closes the application gracefully. This function is intended to be used for error conditions that may be triggered by the user or through invalid configurations.
 
template<typename... Args>
void report_fatal_error (const char *reason_fmt, Args &&... args) noexcept
 Reports a fatal error and handles the application shutdown. This function is intended to be used for error conditions that aren't neither caught by the compiler nor possible to handle by the application at runtime.
 
template<typename T >
bool operator== (span< T > lhs, span< T > rhs)
 
template<typename T >
bool operator!= (span< T > lhs, span< T > rhs)
 
constexpr unsigned bs_channel_bandwidth_to_MHz (bs_channel_bandwidth_fr1 bw)
 Converts the BS channel bandwidth label into the actual BW value in MHz.
 
constexpr bs_channel_bandwidth_fr1 MHz_to_bs_channel_bandwidth (unsigned bw)
 Converts the actual BW value in MHz to the BS channel bandwidth label.
 
constexpr unsigned min_channel_bandwidth_to_MHz (min_channel_bandwidth bw)
 Converts the Minimum Channel Bandwidth for FR1 into the actual BW value in MHz.
 
const charto_string (frequency_range freq_range)
 
std::unique_ptr< uplink_processor_poolcreate_uplink_processor_pool (uplink_processor_pool_config config)
 Creates and returns an uplink processor pool.
 
std::shared_ptr< downlink_processor_factorycreate_downlink_processor_factory_sw (const downlink_processor_factory_sw_config &config)
 Creates a full software based downlink processor factory.
 
std::shared_ptr< downlink_processor_factorycreate_downlink_processor_factory_hw (const downlink_processor_factory_hw_config &config)
 Creates a full hardware-accelerated based downlink processor factory.
 
std::unique_ptr< downlink_processor_poolcreate_dl_processor_pool (downlink_processor_pool_config config)
 Creates and returns a downlink processor pool.
 
bool is_valid_upper_phy_config (const upper_phy_config &config)
 Returns true if the given upper PHY configuration is valid, otherwise false.
 
std::unique_ptr< upper_phy_factorycreate_upper_phy_factory (std::shared_ptr< downlink_processor_factory > downlink_proc_factory, std::shared_ptr< resource_grid_factory > rg_factory)
 Creates and returns an upper PHY factory.
 
constexpr uint16_t nr_band_to_uint (nr_band band)
 
constexpr nr_band uint_to_nr_band (unsigned band)
 
std::unique_ptr< lower_phycreate_lower_phy (lower_phy_configuration &config)
 Creates a generic lower PHY.
 
std::shared_ptr< lower_phy_factorycreate_lower_phy_factory_sw (std::shared_ptr< lower_phy_downlink_processor_factory > downlink_proc_factory, std::shared_ptr< lower_phy_uplink_processor_factory > uplink_proc_factory)
 Creates a software based lower physical layer factory.
 
std::shared_ptr< resource_grid_factorycreate_resource_grid_factory (std::shared_ptr< channel_precoder_factory > precoder_factory)
 Creates and returns a resource grid factory that instantiates resource grids.
 
std::unique_ptr< resource_grid_mappercreate_resource_grid_mapper (unsigned nof_ports, unsigned nof_subc, resource_grid_writer &writer)
 Creates a resource grid mapper with an ideal precoding.
 
std::unique_ptr< resource_grid_poolcreate_generic_resource_grid_pool (std::vector< std::unique_ptr< resource_grid > > grids)
 Creates a generic resource grid pool.
 
std::unique_ptr< resource_grid_poolcreate_asynchronous_resource_grid_pool (unsigned expire_timeout_slots, task_executor &async_executor, std::vector< std::unique_ptr< resource_grid > > grids)
 Creates an asynchronous resource grid pool.
 
std::unique_ptr< prach_buffercreate_prach_buffer_long (unsigned max_nof_antennas, unsigned max_nof_fd_occasions)
 Creates a long PRACH sequence buffer.
 
std::unique_ptr< prach_buffercreate_prach_buffer_short (unsigned max_nof_antennas, unsigned max_nof_td_occasions, unsigned max_nof_fd_occasions)
 Creates a short PRACH sequence buffer.
 
std::unique_ptr< prach_buffer_poolcreate_prach_buffer_pool (std::vector< std::unique_ptr< prach_buffer > > &&elements)
 Returns a pool for the given PRACH buffers.
 
std::unique_ptr< srsran::interpolatorcreate_interpolator ()
 Returns an interpolator.
 
std::shared_ptr< pbch_encoder_factorycreate_pbch_encoder_factory_sw (std::shared_ptr< crc_calculator_factory > crc_factory, std::shared_ptr< pseudo_random_generator_factory > prg_factory, std::shared_ptr< polar_factory > polar_factory)
 
std::shared_ptr< pbch_modulator_factorycreate_pbch_modulator_factory_sw (std::shared_ptr< channel_modulation_factory >, std::shared_ptr< pseudo_random_generator_factory >)
 
std::shared_ptr< pdcch_modulator_factorycreate_pdcch_modulator_factory_sw (std::shared_ptr< channel_modulation_factory >, std::shared_ptr< pseudo_random_generator_factory >)
 
std::shared_ptr< pdcch_encoder_factorycreate_pdcch_encoder_factory_sw (std::shared_ptr< crc_calculator_factory > crc_factory, std::shared_ptr< polar_factory > encoder_factory)
 
std::shared_ptr< pdcch_processor_factorycreate_pdcch_processor_factory_sw (std::shared_ptr< pdcch_encoder_factory > encoder_factory, std::shared_ptr< pdcch_modulator_factory > modulator_factory, std::shared_ptr< dmrs_pdcch_processor_factory > dmrs_factory)
 
std::shared_ptr< pdcch_processor_factorycreate_pdcch_processor_pool_factory (std::shared_ptr< pdcch_processor_factory > processor_factory, unsigned nof_concurrent_threads)
 
std::shared_ptr< pdsch_encoder_factorycreate_pdsch_encoder_factory_sw (pdsch_encoder_factory_sw_configuration &config)
 
std::shared_ptr< pdsch_encoder_factorycreate_pdsch_encoder_factory_hw (const pdsch_encoder_factory_hw_configuration &config)
 
std::shared_ptr< pdsch_modulator_factorycreate_pdsch_modulator_factory_sw (std::shared_ptr< channel_modulation_factory >, std::shared_ptr< pseudo_random_generator_factory >)
 
std::shared_ptr< pdsch_processor_factorycreate_pdsch_processor_factory_sw (std::shared_ptr< pdsch_encoder_factory > encoder_factory, std::shared_ptr< pdsch_modulator_factory > modulator_factory, std::shared_ptr< dmrs_pdsch_processor_factory > dmrs_factory)
 
std::shared_ptr< pdsch_processor_factorycreate_pdsch_concurrent_processor_factory_sw (std::shared_ptr< crc_calculator_factory > crc_factory, std::shared_ptr< ldpc_encoder_factory > ldpc_enc_factory, std::shared_ptr< ldpc_rate_matcher_factory > ldpc_rm_factory, std::shared_ptr< pseudo_random_generator_factory > prg_factory, std::shared_ptr< channel_modulation_factory > modulator_factory, std::shared_ptr< dmrs_pdsch_processor_factory > dmrs_factory, task_executor &executor, unsigned nof_concurrent_threads)
 
std::shared_ptr< pdsch_processor_factorycreate_pdsch_lite_processor_factory_sw (std::shared_ptr< ldpc_segmenter_tx_factory > segmenter_factory, std::shared_ptr< ldpc_encoder_factory > encoder_factory, std::shared_ptr< ldpc_rate_matcher_factory > rate_matcher_factory, std::shared_ptr< pseudo_random_generator_factory > scrambler_factory, std::shared_ptr< channel_modulation_factory > modulator_factory, std::shared_ptr< dmrs_pdsch_processor_factory > dmrs_factory)
 
std::shared_ptr< pdsch_processor_factorycreate_pdsch_processor_pool (std::shared_ptr< pdsch_processor_factory >, unsigned max_nof_processors)
 
std::shared_ptr< prach_detector_factorycreate_prach_detector_factory_sw (std::shared_ptr< dft_processor_factory > dft_factory, std::shared_ptr< prach_generator_factory > prach_gen_factory, const prach_detector_factory_sw_configuration &config={})
 
std::shared_ptr< prach_detector_factorycreate_prach_detector_pool_factory (std::shared_ptr< prach_detector_factory > factory, unsigned nof_concurrent_threads)
 
std::shared_ptr< prach_generator_factorycreate_prach_generator_factory_sw ()
 
std::shared_ptr< pucch_demodulator_factorycreate_pucch_demodulator_factory_sw (std::shared_ptr< channel_equalizer_factory > equalizer_factory, std::shared_ptr< channel_modulation_factory > demodulation_factory, std::shared_ptr< pseudo_random_generator_factory > prg_factory)
 
std::shared_ptr< pucch_detector_factorycreate_pucch_detector_factory_sw (std::shared_ptr< low_papr_sequence_collection_factory > lpcf, std::shared_ptr< pseudo_random_generator_factory > prgf, std::shared_ptr< channel_equalizer_factory > eqzrf)
 
std::shared_ptr< pucch_processor_factorycreate_pucch_processor_factory_sw (std::shared_ptr< dmrs_pucch_estimator_factory > dmrs_factory, std::shared_ptr< pucch_detector_factory > detector_factory, std::shared_ptr< pucch_demodulator_factory > demodulator_factory, std::shared_ptr< uci_decoder_factory > decoder_factory, const channel_estimate::channel_estimate_dimensions &channel_estimate_dimensions)
 
std::shared_ptr< pucch_processor_factorycreate_pucch_processor_pool_factory (std::shared_ptr< pucch_processor_factory > factory, unsigned nof_concurrent_threads)
 
std::shared_ptr< ssb_processor_factorycreate_ssb_processor_factory_sw (ssb_processor_factory_sw_configuration &config)
 
std::shared_ptr< ssb_processor_factorycreate_ssb_processor_pool_factory (std::shared_ptr< ssb_processor_factory > processor_factory, unsigned nof_concurrent_threads)
 
precoding_weight_matrix make_single_port ()
 Constructs a precoder configuration for a single transmitter port.
 
precoding_weight_matrix make_one_layer_one_port (unsigned nof_ports, unsigned i_port)
 Constructs a precoding weight matrix for one layer mapped into one transmit port.
 
precoding_weight_matrix make_identity (unsigned nof_streams)
 Constructs a precoding weight matrix for the one layer–one port mapping.
 
precoding_weight_matrix make_one_layer_all_ports (unsigned nof_ports)
 Constructs a precoding weight matrix for one layer mapped into all transmit ports.
 
precoding_weight_matrix make_one_layer_two_ports (unsigned i_codebook)
 Constructs a precoding weight matrix for one layer mapped into two transmit ports.
 
precoding_weight_matrix make_two_layer_two_ports (unsigned i_codebook)
 Constructs a precoding weight matrix for two layers mapped into two transmit ports.
 
precoding_weight_matrix make_one_layer_four_ports_type1_sp_mode1 (unsigned beam_azimuth_id, unsigned pol_shift_id)
 Constructs a precoding weight matrix for one layer mapped into four transmit ports.
 
precoding_weight_matrix make_two_layer_four_ports_type1_sp_mode1 (unsigned beam_azimuth_id, unsigned beam_offset_id, unsigned pol_shift_id)
 Constructs a precoding weight matrix for two layers mapped into four transmit ports.
 
precoding_weight_matrix make_three_layer_four_ports_type1_sp (unsigned beam_azimuth_id, unsigned pol_shift_id)
 Constructs a precoding weight matrix for three layers mapped into four transmit ports.
 
precoding_weight_matrix make_four_layer_four_ports_type1_sp (unsigned beam_azimuth_id, unsigned pol_shift_id)
 Constructs a precoding weight matrix for three layers mapped into four transmit ports.
 
std::unique_ptr< radio_factorycreate_dynamic_radio_factory ()
 Dynamic library radio factory creation entry point.
 
std::unique_ptr< radio_factorycreate_radio_factory (std::string driver_name)
 Creates a radio factory by selecting an existent factory or loading the appropriate dynamic library.
 
void print_available_radio_factories ()
 Helper function to print all statically linked available radio factories to stdout.
 
constexpr enqueue_priority operator- (enqueue_priority lhs, size_t dec)
 Reduce priority by dec amount.
 
template<concurrent_queue_policy... QueuePolicies>
constexpr concurrent_queue_policy get_priority_queue_policy (enqueue_priority Priority)
 Gets the queue policy for a given priority.
 
size_t compute_host_nof_hardware_threads ()
 Computes the number of threads that are usable in the given host.
 
size_t get_host_max_cpu_id ()
 Get maximum CPU ID available to the application.
 
const charthis_thread_name ()
 Get caller thread name.
 
void print_this_thread_priority ()
 Print caller thread priority.
 
constexpr unsigned divide_ceil (unsigned num, unsigned den)
 Performs an integer division rounding up.
 
constexpr unsigned divide_round (unsigned num, unsigned den)
 Performs an integer division rounding to the nearest integer.
 
constexpr unsigned pow2 (unsigned power)
 Calculates the integer power of 2.
 
constexpr float abs_sq (cf_t x)
 Calculates the squared modulus of a complex value.
 
template<typename Integer >
constexpr Integer log2_ceil (Integer value)
 Calculates $\left \lceil log_2(n) \right \rceil$.
 
float convert_dB_to_amplitude (float value)
 Converts a value in decibels to linear amplitude ratio.
 
float convert_dB_to_power (float value)
 Converts a value in decibels to linear power ratio.
 
float convert_amplitude_to_dB (float value)
 Converts a linear amplitude ratio to decibels.
 
float convert_power_to_dB (float value)
 Converts a linear power ratio to decibels.
 
unsigned prime_greater_than (unsigned n)
 Finds the smallest prime number greater than n.
 
unsigned prime_lower_than (unsigned n)
 Finds the biggest prime number less than n.
 
template<typename Integer >
Integer reverse_byte (Integer byte)
 Reverses the bits of a given byte.
 
template<class T , class CompareLess >
constexpr const T & clamp (const T &value, const T &lower_bound, const T &upper_bound, CompareLess comp)
 Ensures a value is between the given bounds, according to a specified order relation.
 
template<class T >
constexpr const T & clamp (const T &value, const T &lower_bound, const T &upper_bound)
 Ensures a value is between the given bounds, according to the default order relation.
 
std::unique_ptr< dlt_pcapcreate_null_dlt_pcap ()
 Creates a layer DLT PCAP sink that writes the incoming PDUs to a pcap file.
 
std::unique_ptr< dlt_pcapcreate_ngap_pcap (const std::string &filename, task_executor &backend_exec)
 
std::unique_ptr< dlt_pcapcreate_f1ap_pcap (const std::string &filename, task_executor &backend_exec)
 
std::unique_ptr< dlt_pcapcreate_e1ap_pcap (const std::string &filename, task_executor &backend_exec)
 
std::unique_ptr< dlt_pcapcreate_gtpu_pcap (const std::string &filename, task_executor &backend_exec)
 
std::unique_ptr< dlt_pcapcreate_e2ap_pcap (const std::string &filename, task_executor &backend_exec)
 
std::unique_ptr< sctp_network_gatewaycreate_sctp_network_gateway (sctp_network_gateway_creation_message msg)
 Creates an instance of an network gateway.
 
size_t byte_buffer_segment_pool_default_segment_size ()
 Default byte buffer segment size in the byte buffer pool.
 
void init_byte_buffer_segment_pool (std::size_t nof_segments, std::size_t memory_block_size=byte_buffer_segment_pool_default_segment_size())
 Sets the default size of the default byte_buffer segment pool.
 
byte_buffer make_byte_buffer (const std::string &hex_str)
 Converts a hex string (e.g. 01FA02) to a byte buffer.
 
template<typename ByteBufferType >
size_t copy_segments (const ByteBufferType &src, span< uint8_t > dst)
 
span< const uint8_tto_span (const byte_buffer &src, span< uint8_t > tmp_mem)
 
template<typename T >
bool operator== (const optional< T > &lhs, const optional< T > &rhs) noexcept
 
template<typename T >
bool operator== (const optional< T > &lhs, const T &rhs) noexcept
 
template<typename T >
bool operator== (const T &lhs, const optional< T > &rhs) noexcept
 
template<typename T >
bool operator!= (const optional< T > &lhs, const optional< T > &rhs) noexcept
 
template<typename T >
bool operator!= (const optional< T > &lhs, const T &rhs) noexcept
 
template<typename T >
bool operator!= (const T &lhs, const optional< T > &rhs) noexcept
 
template<typename T >
bool operator< (const optional< T > &lhs, const optional< T > &rhs) noexcept
 
std::unique_ptr< rlc_pcapcreate_rlc_pcap (const std::string &filename, task_executor &backend_exec, bool srb_pdus_enabled=true, bool drb_pdus_enabled=true)
 Creates an RLC pcap writer to a file.
 
std::unique_ptr< rlc_pcapcreate_null_rlc_pcap ()
 
const charget_build_hash ()
 Returns a formatted string containing the current commit hash.
 
const charget_build_info ()
 Returns a formatted string containing the current commit hash and branch name (if available).
 
const charget_build_mode ()
 Returns the selected (CMake) build mode as string.
 
constexpr const charto_string (cpu_feature feature)
 
bool cpu_supports_feature (cpu_feature feature)
 Query the CPU whether a CPU feature is supported in runtime.
 
std::string get_cpu_feature_info ()
 
bool cpu_supports_included_features ()
 
void open_trace_file (const std::string &trace_file_name="/tmp/srsran_trace.json")
 Open a file to write trace events to.
 
void close_trace_file ()
 Close the trace file. This function is called automatically when the program exits.
 
bool is_trace_file_open ()
 Check if the trace file is open.
 
const charget_version ()
 Returns the full version with major.minor.patch as string.
 
std::unique_ptr< srs_cu_cp::cu_cpcreate_cu_cp (const srs_cu_cp::cu_cp_configuration &cfg_)
 Creates an instance of an CU-CP.
 
std::unique_ptr< srs_cu_up::cu_up_interfacecreate_cu_up (const srs_cu_up::cu_up_configuration &cfg_)
 Creates an instance of an CU-UP.
 
std::unique_ptr< io_brokercreate_io_broker (io_broker_type type, io_broker_config config={})
 Creates an instance of an IO broker.
 
void enable_backtrace ()
 Enables the backtrace.
 
std::unique_ptr< CLI::Config > create_yaml_config_parser ()
 Creates an instance of a YAML configuration parser.
 
void configure_cli11_with_gnb_appconfig_schema (CLI::App &app, gnb_parsed_appconfig &gnb_parsed_cfg)
 Configures the given CLI11 application with the gNB application configuration schema.
 
void derive_auto_params (gnb_appconfig &gnb_params)
 This function takes the appconfig and generates the values for the parameters set to be auto-configured.
 
srs_cu_cp::rrc_ssb_mtc generate_rrc_ssb_mtc (unsigned period, unsigned offset, unsigned duration)
 Converts and returns SSB periodicity, offset and duration into a valid SSB measurement and timing configuration.
 
subcarrier_spacing generate_subcarrier_spacing (unsigned sc_spacing)
 Converts and returns the subcarrier spacing.
 
srsran::sctp_network_gateway_config generate_ngap_nw_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a NGAP Network Gateway configuration.
 
srs_cu_cp::cu_cp_configuration generate_cu_cp_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a CU-CP configuration.
 
srs_cu_up::cu_up_configuration generate_cu_up_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a CU-UP configuration.
 
std::vector< du_cell_configgenerate_du_cell_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a DU cell configuration.
 
std::map< five_qi_t, srs_cu_cp::cu_cp_qos_configgenerate_cu_cp_qos_config (const gnb_appconfig &config)
 Converts and returns the given gnb application QoS configuration to a CU-CP configuration.
 
std::map< five_qi_t, srs_cu_up::cu_up_qos_configgenerate_cu_up_qos_config (const gnb_appconfig &config)
 Converts and returns the given gnb application QoS configuration to a CU-UP configuration.
 
srsran::security::preferred_integrity_algorithms generate_preferred_integrity_algorithms_list (const gnb_appconfig &config)
 
srsran::security::preferred_ciphering_algorithms generate_preferred_ciphering_algorithms_list (const gnb_appconfig &config)
 
srsran::rlc_am_config generate_rlc_am_config (const rlc_am_appconfig &in_cfg)
 Converts and returns the given gnb RLC AM configuration to a RLC configuration.
 
srsran::mac_lc_config generate_mac_lc_config (const mac_lc_appconfig &in_cfg)
 Converts and returns the given gnb MAC LC configuration to a MAC LC configuration.
 
std::map< five_qi_t, du_qos_configgenerate_du_qos_config (const gnb_appconfig &config)
 Converts and returns the given gnb application QoS configuration to a DU QoS list configuration.
 
std::map< srb_id_t, du_srb_configgenerate_du_srb_config (const gnb_appconfig &config)
 Converts and returns the given gnb application QoS configuration to a DU SRB list configuration.
 
mac_expert_config generate_mac_expert_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a mac expert configuration.
 
scheduler_expert_config generate_scheduler_expert_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a scheduler expert configuration.
 
std::vector< upper_phy_configgenerate_du_low_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to an upper PHY configuration.
 
ru_configuration generate_ru_config (const gnb_appconfig &config, span< const du_cell_config > cells)
 Converts and returns the given gnb application configuration to a Radio Unit configuration.
 
srsran::sctp_network_gateway_config generate_e2ap_nw_config (const gnb_appconfig &config, int ppid)
 Converts and returns the given gnb application configuration to a E2AP Network Gateway configuration.
 
e2ap_configuration generate_e2_config (const gnb_appconfig &config)
 Converts and returns the given gnb application configuration to a E2 configuration.
 
void ntn_augment_rlc_parameters (const ntn_config &ntn_cfg, std::map< srb_id_t, du_srb_config > &srb_cfgs)
 Augments RLC parameters based on NTN configuration.
 
bool validate_appconfig (const gnb_appconfig &config)
 Validates the given GNB application configuration. Returns true on success, false otherwise.
 
std::vector< std::unique_ptr< du > > make_gnb_dus (const gnb_appconfig &gnb_cfg, span< du_cell_config > du_cells, worker_manager &workers, upper_phy_rg_gateway &rg_gateway, upper_phy_rx_symbol_request_notifier &rx_symbol_request_notifier, srs_du::f1c_connection_client &f1c_client_handler, srs_du::f1u_du_gateway &f1u_gw, timer_manager &timer_mng, mac_pcap &mac_p, rlc_pcap &rlc_p, gnb_console_helper &console_helper, e2_connection_client &e2_client_handler, e2_metric_connector_manager &e2_metric_connectors, rlc_metrics_notifier &rlc_json_metrics, metrics_hub &metrics_hub)
 Instanties a list of Distributed Unit (DU) given a gNB application configuration.
 
template<typename Integer >
slot_point operator+ (slot_point slot, Integer jump)
 Sum and subtraction operations between slot_point types.
 
slot_point operator+ (uint32_t jump, slot_point slot)
 
slot_point operator+ (int jump, slot_point slot)
 
slot_point operator- (slot_point slot, uint32_t jump)
 
slot_point operator- (slot_point slot, int jump)
 
slot_point max (slot_point lhs, slot_point rhs)
 Get maximum of two slot points.
 
slot_point min (slot_point lhs, slot_point rhs)
 Get minimum of two slot points.
 
slot_point set_slot_numerology (slot_point sl, unsigned new_numerology)
 
constexpr const charto_string (prach_format_type format)
 
prach_format_type to_prach_format_type (const char *string)
 
constexpr bool is_long_preamble (prach_format_type type)
 Checks if the preamble format is long.
 
constexpr bool is_short_preamble (prach_format_type type)
 Checks if the preamble format is short.
 
unsigned get_preamble_duration (prach_format_type format)
 Gets the PRACH time-domain occasion duration in symbols relative to the RA subcarrier spacing.
 
constexpr bool is_scs_valid (prach_subcarrier_spacing scs)
 Checks if SCS value is valid.
 
constexpr bool is_long_preamble (prach_subcarrier_spacing ra_scs)
 Checks if the RA subcarrier spacing is suitable for long preambles formats.
 
constexpr bool is_short_preamble (prach_subcarrier_spacing ra_scs)
 Checks if the RA subcarrier spacing is suitable for short preambles formats.
 
const charto_string (prach_subcarrier_spacing ra_scs)
 Converts SCS to string.
 
constexpr unsigned to_numerology_value (prach_subcarrier_spacing ra_scs)
 Converts SCS to numerology index ( $\mu$).
 
constexpr unsigned ra_scs_to_Hz (prach_subcarrier_spacing ra_scs)
 Converts SCS to its integer value in hertz.
 
constexpr prach_subcarrier_spacing to_ra_subcarrier_spacing (subcarrier_spacing scs)
 Adapts common resource grid subcarrier spacing to RA subcarrier spacing.
 
prach_subcarrier_spacing to_ra_subcarrier_spacing (unsigned in_scs_Hz)
 Converts a numerical value (a bandwidth in hertz) to an SCS.
 
prach_subcarrier_spacing to_ra_subcarrier_spacing (const char *str)
 Converts a numeric string (representing a bandwidth in kilohertz) to an SCS.
 
const charto_string (restricted_set_config config)
 
std::unique_ptr< radio_unitcreate_dummy_ru (const ru_dummy_configuration &config, ru_dummy_dependencies &dependencies)
 Returns a generic Radio Unit using the given configuration.
 
std::unique_ptr< radio_unitcreate_ofh_ru (const ru_ofh_configuration &config, ru_ofh_dependencies &&dependencies)
 Returns an Open FrontHaul Radio Unit using the given configuration and dependencies.
 
bool check_cpu_governor (srslog::basic_logger &logger)
 Check whether the CPU scaling governor is set to performance.
 
bool check_drm_kms_polling (srslog::basic_logger &logger)
 Check whether the DRM KMS polling is set.
 
bool configure_cgroups (const srsran::os_sched_affinity_bitmask &isol_cpus)
 Configures cgroups.
 
void cleanup_cgroups ()
 Removes cgroups created by the gNB app.
 
gnb_sched_affinity_mask_policy to_affinity_mask_policy (const std::string &value)
 Converts the given sting into an affinity mask policy or returns last if it could not convert it.
 
unsigned to_unsigned (gnb_sched_affinity_mask_types value)
 Converts and returns the given affinity mask type to an integer.
 
gnb_sched_affinity_mask_types to_affinity_mask_type (unsigned value)
 Converts and returns the given value to an affinity mask type.
 
template<typename T , typename... Types>
constexpr const T & variant_get (const variant< Types... > &v)
 Reads the value of the variant given the index or the type (if the type is unique).
 
template<typename T , typename... Types>
constexpr T & variant_get (variant< Types... > &v)
 Reads the value of the variant given the index or the type (if the type is unique).
 
template<typename T , typename... Types>
constexpr bool variant_holds_alternative (const variant< Types... > &v) noexcept
 Checks if the variant v holds the alternative T.
 
template<size_t Idx, typename... Types>
constexpr const autovariant_get (const variant< Types... > &v)
 Reads the value of the variant given the index.
 
template<typename Visitor , typename... Vs>
constexpr auto variant_visit (Visitor &&visitor, Vs &&... vs)
 Apply a visitor to the variant.
 
unsigned ssb_periodicity_to_value (ssb_periodicity periodicity)
 Converts the SSB periodicity property to its corresponding value in milliseconds.
 
subcarrier_spacing to_subcarrier_spacing (ssb_pattern_case pattern_case)
 Returns the subcarrier spacing corresponding to an SS/PBCH block pattern.
 
const charto_string (ssb_pattern_case pattern_case)
 Returns the subcarrier spacing corresponding to an SS/PBCH block pattern.
 
frequency_range to_frequency_range (ssb_pattern_case pattern_case)
 Returns the frequency range corresponding to an SS/PBCH block pattern.
 
unsigned to_symbol_index (dmrs_typeA_position pos)
 
dmrs_additional_positions uint_to_dmrs_additional_positions (uint8_t dmrs_add_pos)
 
constexpr uint16_t five_qi_to_uint (five_qi_t five_qi)
 Convert Five QI type to integer.
 
constexpr five_qi_t uint_to_five_qi (uint16_t five_qi)
 Convert integer to Five QI type.
 
constexpr lcid_t uint_to_lcid (std::underlying_type_t< lcid_t > val)
 
constexpr uint16_t srb_id_to_uint (srb_id_t id)
 
bool is_srb (lcid_t lcid)
 
bool is_lcid_valid (lcid_t lcid)
 
srb_id_t to_srb_id (lcid_t lcid)
 
srb_id_t int_to_srb_id (std::underlying_type_t< srb_id_t > val)
 
lcid_t srb_id_to_lcid (srb_id_t srb_id)
 Convert SRB ID to LCID.
 
const charsrb_id_to_string (srb_id_t srb_id)
 
constexpr uint8_t drb_id_to_uint (drb_id_t id)
 
constexpr drb_id_t uint_to_drb_id (uint8_t id)
 
search_space_id to_search_space_id (unsigned ss_id)
 
bool is_common_search_space (search_space_set_type ss_set)
 Checks whether the SearchSpace set is common or dedicated.
 
sch_mcs_description pdsch_mcs_get_config (pdsch_mcs_table table, sch_mcs_index index)
 Gets the Modulation and Coding Scheme configuration for PDSCH.
 
float to_max_code_rate_float (max_pucch_code_rate opt)
 
sch_mcs_description pusch_mcs_get_config (pusch_mcs_table table, sch_mcs_index index, bool tp_pi2bpsk_present)
 Gets the Modulation and Coding Scheme configuration for PUSCH.
 
constexpr bool is_crnti (rnti_t rnti)
 Checks whether RNTI value corresponds to a C-RNTI value.
 
constexpr rnti_t to_rnti (std::underlying_type_t< rnti_t > number)
 Converts integer to RNTI value.
 
constexpr uint16_t to_value (rnti_t rnti)
 Converts RNTI value to integer.
 
sib_type get_sib_info_type (const sib_info &sib)
 
template<typename Integer >
constexpr Integer mask_msb_zeros (size_t N)
 Returns an unsigned integer with the N most significant bits (MSB) set to zero, and the remaining bits set to 1.
 
template<typename Integer >
constexpr Integer mask_lsb_ones (size_t N)
 Returns an unsigned integer with the N least significant bits (LSB) set to zero, and the remaining bits set to 1.
 
template<typename Integer >
constexpr Integer mask_msb_ones (size_t N)
 Returns an unsigned integer with the N most significant bits (MSB) set to one, and the remaining bits set to zero.
 
template<typename Integer >
Integer mask_lsb_zeros (size_t N)
 Returns an unsigned integer with the N least significant bits (LSB) set to one, and the remaining bits set to zero.
 
uint64_t bit_reverse (uint64_t n)
 Knuth's 64-bit reverse. E.g. 0x0000000000000001 -> 0x8000000000000000. For more information see: https://matthewarcus.wordpress.com/2012/11/18/reversing-a-64-bit-word/.
 
template<typename Integer >
Integer zero_msb_count (Integer value)
 Counts the number of contiguous bits set to zero, starting from the MSB.
 
template<typename Integer >
Integer find_first_msb_one (Integer value)
 Finds the position of the first bit set to one, starting from the MSB.
 
template<typename Integer >
Integer find_first_lsb_one (Integer value)
 Finds the position of the first bit set to one, starting from the LSB.
 
template<typename Integer >
int count_ones (Integer value)
 Counts the number of bits set to one in an integer.
 
template<size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N, LowestInfoBitIsMSBoperator& (const bounded_bitset< N, LowestInfoBitIsMSB > &lhs, const bounded_bitset< N, LowestInfoBitIsMSB > &rhs) noexcept
 Bitwise AND operation result = lhs & rhs.
 
template<size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N, LowestInfoBitIsMSBoperator| (const bounded_bitset< N, LowestInfoBitIsMSB > &lhs, const bounded_bitset< N, LowestInfoBitIsMSB > &rhs) noexcept
 Bitwise AND operation result = lhs | rhs.
 
template<size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N, LowestInfoBitIsMSBfliplr (const bounded_bitset< N, LowestInfoBitIsMSB > &other) noexcept
 Flip bits from left to right.
 
template<size_t N2, size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N2, LowestInfoBitIsMSBfold_and_accumulate (const bounded_bitset< N, LowestInfoBitIsMSB > &other, size_t fold_length, size_t slice_offset, size_t slice_length) noexcept
 Divides a bitset of size "S" into "M" smaller bitsets, where each bitset has length "L=S/M". A bitwise-or operation is performed across bitsets. At the end, a slice with an offset "O" and length "K" is taken from the bitset of length "L" that resulted from the bitwise-or operation. This operation is equivalent to reshaping an array of bits of size "S" into a matrix of dimensions "(M, L)" and applying an "or" operation across all bits of each column. The resulting array of "L" bits, is then sliced with an offset "O" and length "K". The operation asserts if "S % L != 0". E.g. Consider the bitset 1000 0100 0000 1001 (S=16), L=4, O=1, K=2. This function performs the following steps:
 
template<size_t N2, size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N2, LowestInfoBitIsMSBfold_and_accumulate (const bounded_bitset< N, LowestInfoBitIsMSB > &other, size_t fold_length) noexcept
 Performs the fold and accumulate operation, but without slicing at the end.
 
constexpr du_ue_index_t to_du_ue_index (std::underlying_type_t< du_ue_index_t > idx)
 Convert integer to DU UE index type.
 
constexpr bool is_du_ue_index_valid (du_ue_index_t ue_idx)
 
du_cell_index_t to_du_cell_index (std::underlying_type_t< du_cell_index_t > idx)
 Convert integer to DU cell index type.
 
ue_cell_index_t to_ue_cell_index (std::underlying_type_t< ue_cell_index_t > idx)
 
const charto_string (duplex_mode mode)
 
template<typename T >
bool lexical_cast (const std::string &in, srsran::optional< T > &output)
 Parse string into optional type.
 
template<typename Param >
void add_auto_enum_option (CLI::App &app, const std::string &option_name, optional< Param > &param, const std::string &desc)
 Parsing an integer with additional option "auto" into an optional of an enum type.
 
unsigned format1_cp_step_to_uint (nof_cyclic_shifts opt)
 
std::shared_ptr< channel_precoder_factorycreate_channel_precoder_factory (const std::string &precoder_type)
 Creates and returns a channel precoder factory.
 
ci8_t to_ci8 (cf_t value)
 
ci16_t to_ci16 (cf_t value)
 
cf_t to_cf (ci8_t value)
 
cf_t to_cf (cf_t value)
 
cf_t to_cf (ci16_t value)
 
std::shared_ptr< crc_calculator_factorycreate_crc_calculator_factory_sw (const std::string &type)
 
std::shared_ptr< ldpc_decoder_factorycreate_ldpc_decoder_factory_sw (const std::string &dec_type)
 
std::shared_ptr< ldpc_encoder_factorycreate_ldpc_encoder_factory_sw (const std::string &enc_type)
 
std::shared_ptr< ldpc_rate_dematcher_factorycreate_ldpc_rate_dematcher_factory_sw (const std::string &dematcher_type)
 
std::shared_ptr< ldpc_rate_matcher_factorycreate_ldpc_rate_matcher_factory_sw ()
 
std::shared_ptr< ldpc_segmenter_rx_factorycreate_ldpc_segmenter_rx_factory_sw ()
 
std::shared_ptr< ldpc_segmenter_tx_factorycreate_ldpc_segmenter_tx_factory_sw (std::shared_ptr< crc_calculator_factory > crc_factory)
 
std::shared_ptr< polar_factorycreate_polar_factory_sw ()
 
std::shared_ptr< short_block_detector_factorycreate_short_block_detector_factory_sw ()
 
std::shared_ptr< dft_processor_factorycreate_dft_processor_factory_generic ()
 Creates a DFT processor factory based on a generic Radix-2 DFT implementation.
 
std::shared_ptr< dft_processor_factorycreate_dft_processor_factory_fftw (const std::string &optimization_flag, double plan_creation_timeout_s, bool avoid_wisdom=false, const std::string &wisdom_filename="")
 Creates a DFT processor factory based on FFTW library.
 
std::shared_ptr< dft_processor_factorycreate_dft_processor_factory_fftw_slow (bool avoid_wisdom=false, const std::string &wisdom_filename="")
 Creates a sub-optimal DFT processor factory based on FFTW library.
 
std::shared_ptr< dft_processor_factorycreate_dft_processor_factory_fftw_fast (bool avoid_wisdom=false, const std::string &wisdom_filename="")
 Creates an optimal DFT processor factory based on FFTW library.
 
std::shared_ptr< channel_modulation_factorycreate_channel_modulation_sw_factory ()
 
template<typename T >
bool operator== (const interval< T > &lhs, const interval< T > &rhs)
 
template<typename T >
bool operator!= (const interval< T > &lhs, const interval< T > &rhs)
 
template<typename T >
bool operator< (const interval< T > &lhs, const interval< T > &rhs)
 
template<typename T >
interval< T > operator| (const interval< T > &lhs, const interval< T > &rhs)
 Make union of intervals. If intervals do not overlap, the empty interval is returned.
 
template<typename T >
interval< T > operator& (const interval< T > &lhs, const interval< T > &rhs)
 Make intersection of intervals.
 
unsigned ssb_get_l_first (ssb_pattern_case pattern_case, unsigned ssb_idx)
 Calculates the first OFDM symbol in a 5ms SS/PBCH block burst.
 
unsigned ssb_get_k_first (frequency_range fr, subcarrier_spacing ssb_scs, subcarrier_spacing common_scs, ssb_offset_to_pointA offset_to_pointA, ssb_subcarrier_offset subcarrier_offset)
 Calculates the position of the first SS/PBCH block subcarrier relative to Point A.
 
ssb_pattern_case ssb_get_ssb_pattern (subcarrier_spacing ssb_scs, unsigned dl_arfcn)
 Calculates SSB pattern from SSB subcarrier spacing and DL ARFCN.
 
uint8_t ssb_get_L_max (subcarrier_spacing ssb_scs, unsigned dl_arfcn, optional< nr_band > band={})
 Calculates L_max, ie max number of SSB occasions per SSB period. Possible values are {4, 8, 64}.
 
crb_interval get_ssb_crbs (subcarrier_spacing ssb_scs, subcarrier_spacing scs_common, ssb_offset_to_pointA offset_to_pA, ssb_subcarrier_offset k_ssb)
 Calculate the CRBs (with reference to SCS common grid) where the SSB is allocated.
 
std::shared_ptr< uci_decoder_factorycreate_uci_decoder_factory_generic (std::shared_ptr< short_block_detector_factory > decoder_factory, std::shared_ptr< polar_factory > polar_factory, std::shared_ptr< crc_calculator_factory > crc_calc_factory)
 
std::shared_ptr< channel_equalizer_factorycreate_channel_equalizer_factory_zf ()
 Creates a Zero Forcing channel equalizer factory.
 
std::shared_ptr< dmrs_pbch_processor_factorycreate_dmrs_pbch_processor_factory_sw (std::shared_ptr< pseudo_random_generator_factory > prg_factory)
 
std::shared_ptr< dmrs_pdcch_processor_factorycreate_dmrs_pdcch_processor_factory_sw (std::shared_ptr< pseudo_random_generator_factory > prg_factory)
 
std::shared_ptr< dmrs_pdsch_processor_factorycreate_dmrs_pdsch_processor_factory_sw (std::shared_ptr< pseudo_random_generator_factory > prg_factory)
 
std::shared_ptr< dmrs_pucch_estimator_factorycreate_dmrs_pucch_estimator_factory_sw (std::shared_ptr< pseudo_random_generator_factory > prg_factory, std::shared_ptr< low_papr_sequence_collection_factory > lpc_factory, std::shared_ptr< port_channel_estimator_factory > ch_estimator_factory)
 
std::shared_ptr< dmrs_pusch_estimator_factorycreate_dmrs_pusch_estimator_factory_sw (std::shared_ptr< pseudo_random_generator_factory > prg_factory, std::shared_ptr< port_channel_estimator_factory > ch_estimator_factory)
 
std::shared_ptr< nzp_csi_rs_generator_factorycreate_nzp_csi_rs_generator_factory_sw (std::shared_ptr< pseudo_random_generator_factory > prg_factory)
 
std::shared_ptr< nzp_csi_rs_generator_factorycreate_nzp_csi_rs_generator_pool_factory (std::shared_ptr< nzp_csi_rs_generator_factory > generator_factory, unsigned nof_concurrent_threads)
 
std::shared_ptr< port_channel_estimator_factorycreate_port_channel_estimator_factory_sw (std::shared_ptr< dft_processor_factory > dft_f)
 
std::shared_ptr< pss_processor_factorycreate_pss_processor_factory_sw ()
 
std::shared_ptr< sss_processor_factorycreate_sss_processor_factory_sw ()
 
std::unique_ptr< rx_buffer_pool_controllercreate_rx_buffer_pool (const rx_buffer_pool_config &config)
 Creates a receive buffer pool.
 
constexpr std::size_t get_rb_bw_khz (subcarrier_spacing scs)
 Compute RB bandwidth in kHz, based on the used numerology.
 
constexpr std::size_t channel_bw_mhz_to_index_fr1 (unsigned dl_bw_mhz)
 Converts channel bandwidth in MHz to index.
 
constexpr std::size_t channel_bw_mhz_to_index_fr2 (unsigned dl_bw_mhz)
 Converts channel bandwidth in MHz to index.
 
std::size_t get_max_Nprb (unsigned dl_bw_mhz, subcarrier_spacing scs, frequency_range fr)
 
constexpr coreset_id to_coreset_id (unsigned cs_id)
 
scheduling_request_id uint_to_sched_req_id (unsigned sr_id)
 Convert unsigned to scheduling_request_id.
 
unsigned sr_periodicity_to_slot (sr_periodicity period)
 Convert unsigned to scheduling_request_id.
 
sr_prohib_timer to_sr_prohib_timer (unsigned sr_prohibit_timer)
 Return the enum value of sr-ProhibitTimer corresponding to the given unsigned value.
 
sr_max_tx to_sr_max_tx (unsigned max_tx)
 Return the enum value of sr-TransMax corresponding to the given unsigned value.
 
mac_cell_creation_request make_mac_cell_config (du_cell_index_t cell_index, const du_cell_config &du_cfg, std::vector< byte_buffer > bcch_dl_sch_payloads, const sched_cell_configuration_request_message &sched_cell_cfg)
 Derives MAC Cell Configuration from DU Cell Configuration.
 
mac_lc_config make_default_srb_mac_lc_config (lcid_t lcid)
 Generates default SRB MAC Logical Channel configuration for SRBs other than SRB0.
 
mac_lc_config make_default_drb_mac_lc_config ()
 Generates default DRB MAC Logical Channel configuration for DRBs.
 
pdcch_type0_css_coreset_description pdcch_type0_css_coreset_get (nr_band band, subcarrier_spacing ssb_scs, subcarrier_spacing pdcch_scs, uint8_t coreset_zero_index, uint8_t subcarrier_offset)
 Get the CORESET configuration for Type0-PDCCH CSS.
 
unsigned nof_slots_per_tdd_period (const tdd_ul_dl_config_common &cfg)
 Calculates number of slots, using TDD reference SCS, of the TDD UL-DL configuration.
 
bool has_active_tdd_dl_symbols (const tdd_ul_dl_config_common &cfg, unsigned slot_index)
 Calculates whether there are symbols for DL in the current slot index.
 
bool has_active_tdd_ul_symbols (const tdd_ul_dl_config_common &cfg, unsigned slot_index)
 Calculates whether there are symbols for UL in the current slot index.
 
bool is_tdd_full_dl_slot (const tdd_ul_dl_config_common &cfg, unsigned slot_index)
 Checks if all symbols in the current slot index are active for DL.
 
bool is_tdd_full_ul_slot (const tdd_ul_dl_config_common &cfg, unsigned slot_index)
 Checks if all symbols in the current slot index are active for UL.
 
ofdm_symbol_range get_active_tdd_dl_symbols (const tdd_ul_dl_config_common &cfg, unsigned slot_index, cyclic_prefix cp)
 Calculates the number of active DL symbols in the current slot_index.
 
ofdm_symbol_range get_active_tdd_ul_symbols (const tdd_ul_dl_config_common &cfg, unsigned slot_index, cyclic_prefix cp)
 Calculates the number of active UL symbols in the current slot_index.
 
optional< unsignedfind_next_tdd_ul_slot (const tdd_ul_dl_config_common &cfg, unsigned start_slot_index=0)
 Finds the next TDD slot index with UL symbols, starting from the given slot index.
 
optional< unsignedfind_next_tdd_full_ul_slot (const tdd_ul_dl_config_common &cfg, unsigned start_slot_index=0)
 Finds the next TDD slot index with all UL symbols, starting from the given slot index.
 
validator_result is_du_cell_config_valid (const du_cell_config &cell_cfg)
 Checks whether the provided DU cell configuration is valid.
 
prach_configuration prach_configuration_get (frequency_range fr, duplex_mode dm, uint8_t prach_config_index)
 Gets a PRACH configuration.
 
rlc_config make_default_srb0_rlc_config ()
 SRB0 default configuration (only implementation-specific parameters)
 
rlc_config make_default_srb_rlc_config ()
 SRB1, SRB2 and SRB3 default configuration as per TS 38.331, 9.2.1.
 
error_type< std::string > is_scheduler_expert_config_valid (const scheduler_expert_config &config)
 Checks whether the provided scheduler expert configuration is valid.
 
unsigned crb_to_prb (crb_interval bwp_crb_lims, unsigned crb)
 Convert CRB into PRB given the CRB assignment limits. The CRB and PRB are assumed to use the same numerology as reference.
 
prb_interval crb_to_prb (crb_interval bwp_crb_lims, crb_interval crbs)
 Convert an interval of CRBs to an interval of PRBs, given the BWP CRB limits.
 
unsigned prb_to_crb (crb_interval bwp_crb_lims, unsigned prb)
 Convert a PRB into CRB given the BWP CRB limits. The CRB and PRB are assumed to use the same numerology as reference.
 
crb_interval prb_to_crb (crb_interval bwp_crb_lims, prb_interval prbs)
 Convert an interval of PRBs to an interval of CRBs, given the BWP CRB limits.
 
vrb_interval crb_to_vrb_f1_0_common_ss_non_interleaved (crb_interval crbs, unsigned coreset_crb_start)
 Conversion of CRBs to VRBs for a common search space and DCI format 1_0 as per TS38.211, clause 7.3.1.6.
 
std::string to_string (modulation_scheme mod)
 
modulation_scheme modulation_scheme_from_string (const std::string &mod_scheme_string)
 Converts a string into a modulation scheme.
 
constexpr unsigned get_bits_per_symbol (modulation_scheme mod)
 Bits per symbol for a given modulation scheme.
 
bool pdcp_sn_size_from_uint (pdcp_sn_size &sn_size, uint16_t num)
 
constexpr uint8_t pdcp_sn_size_to_uint (pdcp_sn_size sn_size)
 Convert PDCP SN size from enum to unsigned integer.
 
constexpr uint32_t pcdp_sn_cardinality (uint16_t sn_size)
 Returns the value range of the sequence numbers.
 
constexpr uint32_t pdcp_window_size (uint16_t sn_size)
 Returns the PDCP window size.
 
bool pdcp_discard_timer_from_int (pdcp_discard_timer &discard_timer, int num)
 
constexpr int16_t pdcp_discard_timer_to_int (pdcp_discard_timer discard_timer)
 Convert PDCP NR discard timer from enum to integer.
 
pdcp_config pdcp_make_default_srb_config ()
 Make default SRB parameters for PDCP Ref: 3GPP TS 38.331, section 9.2.1.
 
bool validate_prach_detector_phy (prach_format_type format, prach_subcarrier_spacing scs, unsigned zero_correlation_zone, unsigned nof_rx_ports)
 Ensures the PRACH configuration is supported by the detector.
 
template<typename U = double>
constexprto_sampling_rate_Hz (subcarrier_spacing scs, unsigned dft_size)
 Gets the sampling rate from a subcarrier spacing and a DFT size combination.
 
constexpr unsigned get_nsymb_per_slot (const cyclic_prefix cp)
 Defines the number of OFDM symbols per slot, according to TS 38.211 Tables 4.3.2-1 and 4.3.2-2.
 
prach_preamble_information get_prach_preamble_long_info (prach_format_type format)
 Get long PRACH preamble information as per TS38.211 Table 6.3.3.1-1.
 
prach_preamble_information get_prach_preamble_short_info (prach_format_type format, prach_subcarrier_spacing ra_scs, bool last_occasion)
 Get short PRACH preamble information as per TS38.211 Table 6.3.3.1-2.
 
phy_time_unit get_prach_window_duration (prach_format_type format, subcarrier_spacing pusch_scs, unsigned start_symbol_index, unsigned nof_td_occasions)
 Gets the PRACH window duration.
 
prach_symbols_slots_duration get_prach_duration_info (const prach_configuration &prach_cfg, subcarrier_spacing pusch_scs)
 Compute PRACH preamble duration information.
 
bool from_string (rlc_mode &mode, const std::string &str)
 
constexpr uint16_t to_number (rlc_um_sn_size sn_size)
 
bool from_number (rlc_um_sn_size &sn_size, uint16_t num)
 
constexpr uint16_t to_number (rlc_am_sn_size sn_size)
 Converts sequence number field to numeric its value.
 
bool from_number (rlc_am_sn_size &sn_size, uint16_t num)
 
bool rlc_t_reassembly_from_int (rlc_t_reassembly &t_reassembly, int num)
 
bool rlc_t_poll_retransmit_from_int (rlc_t_poll_retransmit &t_poll_retransmit, int num)
 
bool rlc_max_retx_threshold_from_int (rlc_max_retx_threshold &max_retx_threshold, int num)
 
bool rlc_poll_pdu_from_int (rlc_poll_pdu &poll_pdu, int num)
 
bool rlc_poll_kilo_bytes_from_int (rlc_poll_kilo_bytes &poll_bytes, int num)
 
bool rlc_t_status_prohibit_from_int (rlc_t_status_prohibit &status_prohibit, int num)
 
constexpr uint32_t cardinality (uint16_t sn_size)
 Returns the value range of the sequence numbers.
 
constexpr uint32_t window_size (uint16_t sn_size)
 Returns the UM_Window_Size and AM_Window_Size Ref: 3GPP TS 38.322 Sec. 7.2.
 
constexpr unsigned to_number (rlc_dc_field dc)
 
constexpr uint16_t to_number (rlc_si_field si_field)
 
constexpr uint16_t to_number (rlc_control_pdu_type type)
 
std::unique_ptr< cu_up_executor_poolmake_cu_up_executor_mapper (span< task_executor * > dl_pdu_executors, span< task_executor * > ul_pdu_executors, span< task_executor * > ctrl_executors)
 Creates an executor mapper for the CU-UP.
 
std::unique_ptr< task_execution_contextcreate_execution_context (const execution_config_helper::single_worker &params)
 Create a single worker execution context.
 
std::unique_ptr< task_execution_contextcreate_execution_context (const execution_config_helper::worker_pool &params)
 Create a worker pool execution context.
 
std::unique_ptr< task_execution_contextcreate_execution_context (const execution_config_helper::priority_multiqueue_worker &params)
 Create a multi-priority worker execution context.
 
const charto_string (bsr_format bsr)
 
std::underlying_type< periodic_bsr_timer >::type periodic_bsr_timer_to_value (periodic_bsr_timer timer)
 Return the value of periodic_bsr_timer.
 
periodic_bsr_timer to_periodic_bsr_timer (unsigned timer_value)
 Return the enum value of periodic_bsr_timer corresponding to give value.
 
std::underlying_type< periodic_bsr_timer >::type retx_bsr_timer_to_value (retx_bsr_timer timer)
 Return the value of retx_bsr_timer.
 
retx_bsr_timer to_retx_bsr_timer (unsigned timer_value)
 Return the enum value of retx_bsr_timer corresponding to give value.
 
std::underlying_type< periodic_bsr_timer >::type lc_sr_delay_timer_to_value (logical_channel_sr_delay_timer timer)
 Return the value of logical_channel_sr_delay_timer.
 
logical_channel_sr_delay_timer to_lc_sr_delay_timer (unsigned timer_value)
 Return the enum value of logical_channel_sr_delay_timer corresponding to give value.
 
std::underlying_type< phr_periodic_timer >::type phr_periodic_timer_to_value (phr_periodic_timer timer)
 Return the value of phr_periodic_timer.
 
std::underlying_type< phr_prohibit_timer >::type phr_prohibit_timer_to_value (phr_prohibit_timer timer)
 Return the value of phr_prohibit_timer.
 
phr_prohibit_timer to_phr_prohibit_timer (unsigned prohib_timer)
 Return the enum value of phr-ProhibitTimer corresponding to the given unsigned value.
 
std::underlying_type< phr_tx_power_factor_change >::type phr_tx_pw_factor_change_to_value (phr_tx_power_factor_change timer)
 Return the value of phr_prohibit_timer.
 
ofdm_symbol_range sliv_to_ofdm_symbols (uint32_t sliv)
 Converts SLIV to OFDM symbol start S and length L.
 
uint32_t ofdm_symbol_range_to_sliv (ofdm_symbol_range symb_range)
 Converts OFDM symbol range to SLIV.
 
constexpr bwp_id_t to_bwp_id (std::underlying_type_t< bwp_id_t > value)
 Converts integer value to BWP-Id".
 
serv_cell_index_t uint_to_serv_cell_index (unsigned idx)
 Converts a uint into a serv_cell_index.
 
serv_cell_index_t to_serv_cell_index (std::underlying_type_t< serv_cell_index_t > val)
 
bool pdcp_t_reordering_from_int (pdcp_t_reordering &t_reord, int num)
 Conversion of t-Reordering from integer to enum.
 
constexpr int16_t pdcp_t_reordering_to_int (pdcp_t_reordering t_reordering)
 Convert PDCP NR t-Reordering from enum to integer.
 
constexpr uint16_t pdu_session_id_to_uint (pdu_session_id_t id)
 Convert PDU Session ID type to integer.
 
constexpr pdu_session_id_t uint_to_pdu_session_id (uint16_t idx)
 Convert integer to PDU Session ID type.
 
constexpr uint8_t qos_flow_id_to_uint (qos_flow_id_t id)
 Convert QoS Flow ID type to integer.
 
constexpr qos_flow_id_t uint_to_qos_flow_id (uint8_t idx)
 Convert integer to QoS Flow ID type.
 
uint64_t ran_ue_id_to_uint (ran_ue_id_t id)
 Convert RAN_UE_ID type to integer.
 
ran_ue_id_t uint_to_ran_ue_id (std::underlying_type_t< ran_ue_id_t > id)
 Convert integer to RAN_UE_ID type.
 
bool from_string (integrity_protection_indication_t &integrity_protection_ind, const std::string &str)
 
bool from_string (confidentiality_protection_indication_t &confidentiality_protection_ind, const std::string &str)
 
bool security_result_required (const security_indication_t &security_indication)
 Checks whether a security_result shall be sent.
 
template<typename Asn1Type >
void up_transport_layer_info_to_asn1 (Asn1Type &asn1obj, const up_transport_layer_info &up_tp_layer_info)
 Converts type up_transport_layer_info to an ASN.1 type.
 
template<typename Asn1Type >
up_transport_layer_info asn1_to_up_transport_layer_info (Asn1Type &asn1obj)
 Converts ASN.1 type into up_transport_layer_info.
 
gnb_du_id_t int_to_gnb_du_id (uint64_t id)
 
prioritized_bit_rate to_prioritized_bit_rate (unsigned pbr)
 Returns the prioritized_bit_rate enum value corresponding to the given unsigned value.
 
bucket_size_duration to_bucket_size_duration (unsigned bsd)
 Returns the bucket_size_duration enum value corresponding to the given unsigned value.
 
std::unique_ptr< mac_pcapcreate_mac_pcap (const std::string &filename, mac_pcap_type pcap_type, task_executor &backend_exec)
 Creates a MAC pcap writer to a file.
 
std::unique_ptr< mac_pcapcreate_null_mac_pcap ()
 
unsigned to_nof_cces (aggregation_level lvl)
 Calculates number of CCEs based on Aggregation Level as per TS38.211 Table 7.3.2.1-1.
 
unsigned to_aggregation_level_index (aggregation_level lvl)
 Calculates the index associated to the passed aggregation level.
 
aggregation_level aggregation_index_to_level (uint8_t aggr_lvl_idx)
 Return aggregation level enum value.
 
unsigned sib1_rtx_periodicity_to_value (sib1_rtx_periodicity periodicity)
 Converts the SIB1 periodicity property to its corresponding value in milliseconds.
 
constexpr unsigned get_crc_size (crc_generator_poly poly)
 
bool operator== (const re_pattern &pattern1, const re_pattern &pattern2)
 Checks if two RE patterns are equal.
 
void hard_decision (bit_buffer &hard_bits, span< const log_likelihood_ratio > soft_bits)
 Obtains hard bits from a vector of soft bits.
 
std::shared_ptr< low_papr_sequence_collection_factorycreate_low_papr_sequence_collection_sw_factory (std::shared_ptr< low_papr_sequence_generator_factory > lpg_factory)
 
std::shared_ptr< low_papr_sequence_generator_factorycreate_low_papr_sequence_generator_sw_factory ()
 
std::shared_ptr< pseudo_random_generator_factorycreate_pseudo_random_generator_sw_factory ()
 
bool is_valid_lower_phy_config (const lower_phy_configuration &config)
 Returns true if the given lower PHY configuration is valid, otherwise false.
 
bool is_valid_ru_ofh_config (const ru_ofh_configuration &config)
 Returns true if the given Open Fronthaul configuration is valid, otherwise false.
 
std::unique_ptr< dumake_du (const du_config &du_cfg)
 Instantiates a Distributed Unit (DU) object.
 
coro_handle< noop_coroutine_promisenoop_coroutine () noexcept
 
template<typename FunT , typename... Args>
auto launch_async (Args &&... args) -> typename detail::future_of< FunT >
 Creates coroutine frame and launches task if eager.
 
template<typename FunT >
auto launch_async (FunT &&f) -> typename detail::future_of< FunT >
 Creates coroutine frame and launches task if eager.
 
constexpr ldpc_base_graph_type get_ldpc_base_graph (float R, units::bits A)
 Returns the LDPC base graph based on the given code rate and transport block size in bits, as per TS 38.212 section 7.2.2.
 
lcg_id_t uint_to_lcg_id (std::underlying_type_t< lcg_id_t > val)
 
template<typename Integer >
constexpr void sliv_to_s_and_l (unsigned N, unsigned sliv, Integer &S, Integer &L)
 Convert SLIV to start S and length L.
 
constexpr unsigned sliv_from_s_and_l (unsigned N, unsigned S, unsigned L)
 Convert start S and length L into SLIV.
 
prb_bitmapoperator|= (prb_bitmap &prb_bits, const prb_interval &grant)
 
prb_bitmap convert_rbgs_to_prbs (const rbg_bitmap &rbgs, crb_interval bwp_rbs, nominal_rbg_size P)
 
tag_id_t uint_to_tag_id (unsigned tag_id)
 Converts a uint into a enum tag_id_t .
 
std::underlying_type< time_alignment_timer >::type time_alignment_timer_to_value (time_alignment_timer timer)
 Return the value of time_alignment_timer.
 
unsigned csi_resource_periodicity_to_uint (csi_resource_periodicity val)
 
const span< const csi_resource_periodicitycsi_resource_periodicity_options ()
 
template<class Insertable >
void string_parse_list (const std::string &input, char delimiter, Insertable &list)
 
template<typename ValueType >
ValueType any_cast (const any &operand)
 
template<typename ValueType >
ValueType any_cast (any &operand)
 
template<typename ValueType >
ValueType any_cast (any &&operand)
 
template<typename ValueType >
const ValueTypeany_cast (const any *operand) noexcept
 
template<typename ValueType >
ValueTypeany_cast (any *operand) noexcept
 
constexpr uint8_t qos_prio_level_to_uint (qos_prio_level_t qos_prio_level)
 Convert QoS Priority Level type to integer.
 
constexpr qos_prio_level_t uint_to_qos_prio_level (uint8_t qos_prio_level)
 Convert integer to QoS Priority Level type.
 
constexpr gtpu_teid_t int_to_gtpu_teid (uint32_t teid_val)
 Convert integer to GTP-U TEID value.
 
template<typename Callback , typename ReturnType = detail::function_return_t<decltype(&std::decay_t<Callback>::operator())>, std::enable_if_t< std::is_same< ReturnType, void >::value, int > = 0>
async_task< boolwhen_completed_on_task_sched (fifo_async_task_scheduler &task_sched, Callback &&task_to_run)
 Launches an asynchronous task on the given task sequencer and returns an async task that is only complete when the former is complete.
 
template<typename Callback , typename ReturnType = detail::function_return_t<decltype(&std::decay_t<Callback>::operator())>, std::enable_if_t< not std::is_same< ReturnType, void >::value, int > = 0>
async_task< optional< ReturnType > > when_completed_on_task_sched (fifo_async_task_scheduler &task_sched, Callback &&task_to_run)
 
template<typename Executor >
std::unique_ptr< task_executormake_sync_executor (Executor &&executor)
 
template<typename Exec , typename Task , typename OnTaskDispatchFailure >
void force_blocking_execute (Exec &&exec, Task &&task, OnTaskDispatchFailure &&fail_func, unsigned max_attempts=std::numeric_limits< unsigned >::max())
 Forces the dispatch of a task and its execution to completion.
 
constexpr uint64_t gnb_cu_ue_f1ap_id_to_uint (gnb_cu_ue_f1ap_id_t id)
 
constexpr gnb_cu_ue_f1ap_id_t int_to_gnb_cu_ue_f1ap_id (uint64_t idx)
 Convert integer to GNB-CU-UE-F1AP-ID type.
 
constexpr uint64_t gnb_du_ue_f1ap_id_to_uint (gnb_du_ue_f1ap_id_t id)
 
constexpr gnb_du_ue_f1ap_id_t int_to_gnb_du_ue_f1ap_id (uint64_t idx)
 Convert integer to GNB-DU-UE-F1AP-ID type.
 
constexpr uint64_t gnb_cu_cp_ue_e1ap_id_to_uint (gnb_cu_cp_ue_e1ap_id_t id)
 
constexpr gnb_cu_cp_ue_e1ap_id_t int_to_gnb_cu_cp_ue_e1ap_id (uint64_t idx)
 Convert integer to GNB-CU-CP-UE-E1AP-ID type.
 
constexpr uint64_t gnb_cu_up_ue_e1ap_id_to_uint (gnb_cu_up_ue_e1ap_id_t id)
 
constexpr gnb_cu_up_ue_e1ap_id_t int_to_gnb_cu_up_ue_e1ap_id (uint64_t idx)
 Convert integer to GNB-DU-UE-E1AP-ID type.
 
nr_cell_global_id_t cgi_from_asn1 (const asn1::f1ap::nr_cgi_s &asn1_cgi)
 Converts ASN.1 CGI typo into internal struct. It also performs the byte to MCC/MNC conversion.
 
bool string_to_mcc (std::string str, uint16_t *mcc)
 
bool mcc_to_string (uint16_t mcc, std::string *str)
 
bool bytes_to_mcc (const uint8_t *bytes, uint16_t *mcc)
 
bool mcc_to_bytes (uint16_t mcc, uint8_t *bytes)
 
std::string mcc_bytes_to_string (uint8_t *mcc_bytes)
 
bool string_to_mnc (std::string str, uint16_t *mnc)
 
bool mnc_to_string (uint16_t mnc, std::string *str)
 
bool bytes_to_mnc (const uint8_t *bytes, uint16_t *mnc, uint8_t len)
 
bool mnc_to_bytes (uint16_t mnc, uint8_t *bytes, uint8_t *len)
 
template<class Vec >
bool mnc_to_bytes (uint16_t mnc, Vec &vec)
 
std::string mnc_bytes_to_string (uint8_t *mnc_bytes, uint32_t nof_bytes)
 
template<class Vec >
std::string mnc_bytes_to_string (Vec mnc_bytes)
 
void ngap_plmn_to_mccmnc (uint32_t plmn, uint16_t *mcc, uint16_t *mnc)
 
void ngap_mccmnc_to_plmn (uint16_t mcc, uint16_t mnc, uint32_t *plmn)
 
uint32_t plmn_string_to_bcd (const std::string &plmn)
 
std::string plmn_bcd_to_string (uint32_t plmn)
 
std::unique_ptr< udp_network_gatewaycreate_udp_network_gateway (udp_network_gateway_creation_message msg)
 Creates an instance of an network gateway.
 
std::unique_ptr< gtpu_demuxcreate_gtpu_demux (const gtpu_demux_creation_request &msg)
 Creates an instance of an GTP-U demux object.
 
std::unique_ptr< gtpu_echocreate_gtpu_echo (gtpu_echo_creation_message &msg)
 Creates an instance of a GTP-U entity.
 
std::unique_ptr< gtpu_teid_poolcreate_gtpu_allocator (const gtpu_allocator_creation_request &msg)
 
pdcp_config make_pdcp_drb_config (const e1ap_pdcp_config &e1ap_cfg, const security_indication_t &security_ind)
 
sdap_config make_sdap_drb_config (const sdap_config_t &e1ap_cfg)
 
std::unique_ptr< gtpu_tunnel_ngucreate_gtpu_tunnel_ngu (gtpu_tunnel_ngu_creation_message &msg)
 Creates an instance of a GTP-U entity.
 
std::unique_ptr< pdcp_entitycreate_pdcp_entity (pdcp_entity_creation_message &msg)
 Creates an instance of a PDCP entity.
 
std::unique_ptr< fapi_adaptor::phy_fapi_adaptorbuild_phy_fapi_adaptor (unsigned sector_id, unsigned nof_slots_request_headroom, subcarrier_spacing scs, subcarrier_spacing scs_common, downlink_processor_pool &dl_processor_pool, resource_grid_pool &dl_rg_pool, uplink_request_processor &ul_request_processor, resource_grid_pool &ul_rg_pool, uplink_slot_pdu_repository &ul_pdu_repository, const downlink_pdu_validator &dl_pdu_validator, const uplink_pdu_validator &ul_pdu_validator, const fapi::prach_config &prach_cfg, const fapi::carrier_config &carrier_cfg, std::unique_ptr< fapi_adaptor::precoding_matrix_repository > pm_repo, std::unique_ptr< fapi_adaptor::uci_part2_correspondence_repository > part2_repo, std::vector< uint8_t > prach_ports)
 
dci_sizes get_dci_sizes (const dci_size_config &config)
 DCI payload size alignment procedure.
 
dci_payload dci_0_0_c_rnti_pack (const dci_0_0_c_rnti_configuration &config)
 Packs a DCI format 0_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI.
 
dci_payload dci_0_0_tc_rnti_pack (const dci_0_0_tc_rnti_configuration &config)
 Packs a DCI format 0_0 scrambled by TC-RNTI.
 
dci_payload dci_1_0_c_rnti_pack (const dci_1_0_c_rnti_configuration &config)
 Packs a DCI format 1_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI.
 
dci_payload dci_1_0_p_rnti_pack (const dci_1_0_p_rnti_configuration &config)
 Packs a DCI format 1_0 scrambled by P-RNTI.
 
dci_payload dci_1_0_si_rnti_pack (const dci_1_0_si_rnti_configuration &config)
 Packs a DCI format 1_0 scrambled by SI-RNTI.
 
dci_payload dci_1_0_ra_rnti_pack (const dci_1_0_ra_rnti_configuration &config)
 Packs a DCI format 1_0 scrambled by RA-RNTI.
 
dci_payload dci_1_0_tc_rnti_pack (const dci_1_0_tc_rnti_configuration &config)
 Packs a DCI format 1_0 scrambled by TC-RNTI.
 
dci_payload dci_0_1_pack (const dci_0_1_configuration &config)
 Packs a DCI format 0_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI.
 
dci_payload dci_1_1_pack (const dci_1_1_configuration &config)
 Packs a DCI format 1_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI.
 
dci_payload dci_rar_pack (const dci_rar_configuration &config)
 Packs a DCI transmitted in a Random Access Response.
 
bool validate_dci_size_config (const dci_size_config &config)
 Validates a DCI configuration for the DCI size alignment procedure.
 
unsigned to_nominal_rbg_size_value (nominal_rbg_size sz)
 
nominal_rbg_size get_nominal_rbg_size (unsigned bwp_nof_prb, bool is_config_1)
 
unsigned get_nof_rbgs (crb_interval bwp_rb_dims, nominal_rbg_size P)
 
unsigned get_nof_rbgs (crb_interval bwp_rb_dims, bool config1_or_2)
 
uint32_t get_rbg_size (crb_interval bwp_rbs, nominal_rbg_size P, uint32_t rbg_idx)
 
unsigned csi_report_periodicity_to_uint (csi_report_periodicity period)
 
csi_rs_pattern get_csi_rs_pattern (const csi_rs_pattern_configuration &config)
 Generates the CSI-RS pattern.
 
const charto_string (csi_rs_cdm_type value)
 Converts a CSI-RS CDM type to a string representation.
 
const charto_string (csi_rs_freq_density_type value)
 Converts a CSI-RS density type to a string representation.
 
float alpha_scaling_to_float (alpha_scaling_opt val)
 
pdcch_type0_css_occasion_pattern1_description pdcch_type0_css_occasions_get_pattern1 (const pdcch_type0_css_occasion_pattern1_configuration &config)
 Get Type0-PDCCH CSS occasions for multiplexing pattern 1 as per TS38.213 Section 13.
 
unsigned type0_pdcch_css_n0_is_even_frame (double table_13_11_and_13_12_O, double table_13_11_and_13_12_M, uint8_t numerology_mu, unsigned ssb_index)
 Helper function that returns whether slot n0 of Type0-PDCCH CSS is in an even/odd frame.
 
slot_point get_type0_pdcch_css_n0 (double table_13_11_and_13_12_O, double table_13_11_and_13_12_M, subcarrier_spacing scs_common, unsigned ssb_index)
 Helper function that returns slot n0 (where UE should monitor Type0-PDCCH CSS) for a given SSB (beam) index.
 
template<typename Range , typename IdentifierGetter >
bool has_unique_ids (const Range &r, const IdentifierGetter &id_get)
 Check if all elements of a range have a unique ID, which is provided via id_get.
 
template<typename Range , typename ValueType = typename Range::value_type, typename IdType >
bool has_unique_ids (const Range &r, IdType ValueType::*id_field)
 Check if all elements of a range have a unique ID, where the ID can be accessed via the provided field pointer.
 
template<typename Range >
bool are_all_unique (const Range &r)
 Check if all elements of a range are unique.
 
template<typename RangeSet , typename Range , typename SetValueType = typename RangeSet::value_type, typename ValueType = typename Range::value_type, typename IdType , typename IdList >
optional< IdTypefind_disconnected_id (const RangeSet &set, const Range &r, IdList SetValueType::*id_set_list, IdType ValueType::*idfield)
 Find an ID in id_set_list of set that is not present in range r.
 
constexpr harq_id_t to_harq_id (unsigned h_id)
 
constexpr const charto_string (uci_pucch_f0_or_f1_harq_values value)
 
float beta_harq_ack_to_float (unsigned beta_uint_val)
 Maps the integer beta_offset value for HARQ-ACK reporting into the corresponding float value.
 
float beta_csi_to_float (unsigned beta_uint_val)
 Maps the integer beta_offset value for CSI reporting into the corresponding float value.
 
dci_dl_format get_dci_dl_format (dci_dl_rnti_config_type rnti_dci_type)
 Retrieve DCI format from DCI DL payload format.
 
const chardci_dl_rnti_config_rnti_type (dci_dl_rnti_config_type type)
 
const chardci_dl_rnti_config_format (dci_dl_rnti_config_type type)
 
const chardci_ul_rnti_config_rnti_type (dci_ul_rnti_config_type type)
 
const chardci_ul_rnti_config_format (dci_ul_rnti_config_type type)
 
const charto_string (pmi_codebook_type codebook)
 
const charto_string (csi_report_quantities quantities)
 
unsigned sr_nof_bits_to_uint (sr_nof_bits sr_bits)
 Converts sr_nof_bits into unsigned.
 
sr_nof_bits operator+ (sr_nof_bits x, sr_nof_bits y)
 Implements the + operator for sr_nof_bits.
 
const charto_string (uci_status status)
 Gets a string representing a uci_status value.
 
std::unique_ptr< mac_interfacecreate_du_high_mac (const mac_config &mac_cfg, const srs_du::du_test_config &test_cfg)
 Create a MAC instance for DU-high. In case the test mode is enabled, the MAC messages will be intercepted.
 
std::unique_ptr< mac_interfacecreate_mac (const mac_config &mac_cfg)
 
units::bits get_csi_report_pucch_size (const csi_report_configuration &config)
 Gets the Channel State Information (CSI) report size when the CSI report is transmitted in PUCCH.
 
bool validate_pucch_csi_payload (const csi_report_packed &packed, const csi_report_configuration &config)
 Checks that the CSI payload carried over PUCCH is valid given a CSI report configuration.
 
csi_report_data csi_report_unpack_pucch (const csi_report_packed &packed, const csi_report_configuration &config)
 Unpacks Channel State Information (CSI) report multiplexed in PUCCH.
 
std::unique_ptr< e2_interfacecreate_e2 (e2ap_configuration &e2ap_cfg_, timer_factory timers_, e2_message_notifier &e2_pdu_notifier_, e2_subscription_manager &e2_subscriber_, e2sm_manager &e2sm_manager_)
 Creates an instance of an E2 interface, notifying outgoing packets on the specified listener object.
 
std::unique_ptr< e2_interfacecreate_e2_with_task_exec (e2ap_configuration &e2ap_cfg_, timer_factory timers_, e2_message_notifier &e2_pdu_notifier_, e2_subscription_manager &e2_subscription_mngr_, e2sm_manager &e2sm_manager_, task_executor &e2_exec_)
 Creates a decorated instance of an E2 interface (with a task executor)
 
std::unique_ptr< e2_interfacecreate_e2_entity (e2ap_configuration &e2ap_cfg_, e2_connection_client *e2_client_, e2_du_metrics_interface &e2_du_metrics_, srs_du::f1ap_ue_id_translator &f1ap_ue_id_translator_, du_configurator &du_configurator_, timer_factory timers_, task_executor &e2_exec_)
 Creates a instance of an E2 interface (with subscription manager)
 
std::unique_ptr< e2ap_packercreate_e2ap_asn1_packer (sctp_network_gateway_data_handler &gw_, e2_message_handler &e2_, dlt_pcap &pcap_)
 Creates an instance of an E2AP ASN1 packer.
 
template<typename GetId >
obj_id_comparator< GetId > make_id_comparator (GetId &&g)
 
template<typename AddModList , typename RemoveList , typename GetId >
void apply_addmodremlist_diff (const AddModList &prev_list, const AddModList &add_diff_list, const RemoveList &rm_diff_list, AddModList &next_list, const GetId &id_func)
 
template<typename AddModList , typename RemoveList , typename GetId >
void apply_addmodremlist_diff (AddModList &src_and_dest_list, const AddModList &add_diff_list, const RemoveList &rm_diff_list, const GetId &id_func)
 
template<typename List , typename RemFunctor , typename AddFunctor , typename ModFunctor , typename GetId >
std::enable_if_t< not is_iterable< AddFunctor >::value > calculate_addmodremlist_diff (const RemFunctor &rem_func, const AddFunctor &add_func, const ModFunctor &mod_func, const List &prev_list, const List &next_list, const GetId &id_func)
 Invokes rem_func, add_func and mod_func for any detected differences between prev_list and next_list.
 
template<typename List , typename toAddModList , typename RemoveList , typename ConvertElem , typename GetId >
std::enable_if_t< is_iterable< toAddModList >::value > calculate_addmodremlist_diff (toAddModList &add_diff_list, RemoveList &rem_diff_list, const List &prev_list, const List &next_list, const ConvertElem &convert_func, const GetId &id_func)
 Generate toAddModList and toReleaseList based on differences between prev_list and next_list.
 
template<typename toAddModList , typename RemoveList , typename GetId >
void calculate_addmodremlist_diff (toAddModList &add_diff_list, RemoveList &rem_diff_list, const toAddModList &prev_list, const toAddModList &next_list, const GetId &id_func)
 Generate toAddModList and toReleaseList based on differences between prev_list and next_list.
 
template<typename Asn1Type , typename OptionalElem , typename ConvertElem >
bool calculate_setup_release (asn1::setup_release_c< Asn1Type > &setup_rel, const optional< OptionalElem > &prev, const optional< OptionalElem > &next, const ConvertElem &convert_func)
 Sets up the setup/release ASN.1 object based on the difference between prev and next.
 
std::unique_ptr< rlc_entitycreate_rlc_entity (const rlc_entity_creation_message &msg)
 Creates an instance of a RLC bearer.
 
template<typename TaskExecutor >
auto execute_on (TaskExecutor &exec)
 Awaiter that switches to execution context provided by given executor.
 
template<typename TaskExecutor >
auto defer_to (TaskExecutor &exec)
 Awaiter that defers continuation to execution context provided by given executor.
 
template<typename DispatchTaskExecutor , typename ResumeTaskExecutor , typename Callable , typename ResultType = detail::function_return_t<decltype(&std::decay_t<Callable>::operator())>, std::enable_if_t< not std::is_same< ResultType, void >::value, int > = 0>
auto offload_to_executor (DispatchTaskExecutor &dispatch_exec, ResumeTaskExecutor &resume_exec, Callable &&callable)
 
template<typename DispatchTaskExecutor , typename CurrentTaskExecutor , typename Callable , typename ReturnType = detail::function_return_t<decltype(&Callable::operator())>>
std::enable_if_t< std::is_same< ReturnType, void >::value, async_task< void > > dispatch_and_resume_on (DispatchTaskExecutor &dispatch_exec, CurrentTaskExecutor &return_exec, Callable &&callable)
 
template<typename DispatchTaskExecutor , typename CurrentTaskExecutor , typename Callable , typename ReturnType = detail::function_return_t<decltype(&Callable::operator())>>
std::enable_if_t< not std::is_same< ReturnType, void >::value, async_task< ReturnType > > dispatch_and_resume_on (DispatchTaskExecutor &dispatch_exec, CurrentTaskExecutor &return_exec, Callable &&callable)
 
template<typename Resp >
async_task< std::decay_t< Resp > > launch_no_op_task (Resp &&r)
 Launches an async task that finishes immediately with the result set by the caller to this function.
 
async_task< voidlaunch_no_op_task ()
 Launches an async task that finishes immediately with the result set by the caller to this function.
 
template<size_t N>
const charto_c_str (fmt::basic_memory_buffer< char, N > &mem_buffer)
 Converts fmt memoryy buffer to c_str() without the need for conversion to intermediate std::string.
 
template<typename UniqueTimer >
auto async_wait_for (UniqueTimer &&timer, std::chrono::milliseconds duration_msec)
 Returns an awaitable object that is only ready when the passed duration_msec has elapsed.
 
void log_proc_started (srslog::basic_logger &logger, du_ue_index_t ue_index, rnti_t rnti, const char *proc_name)
 
void log_proc_started (srslog::basic_logger &logger, du_ue_index_t ue_index, const char *proc_name)
 
void log_proc_completed (srslog::basic_logger &logger, du_ue_index_t ue_index, rnti_t rnti, const char *proc_name)
 
template<typename... Args>
void log_proc_failure (srslog::basic_logger &logger, du_ue_index_t ue_index, const char *proc_name, const char *cause_fmt="", Args &&... args)
 
template<typename... Args>
void log_proc_failure (srslog::basic_logger &logger, du_ue_index_t ue_index, rnti_t rnti, const char *proc_name, const char *cause_fmt="", Args &&... args)
 
template<typename... Args>
void log_proc_event (srslog::basic_logger &logger, du_ue_index_t ue_index, const char *proc_name, const char *cause_fmt, Args &&... args)
 
template<typename... Args>
void log_ue_event (srslog::basic_logger &logger, const ue_event_prefix &ue_prefix, const char *cause_fmt, Args &&... args)
 
template<typename... Args>
void log_ue_proc_event (srslog::log_channel &log_ch, const ue_event_prefix &ue_prefix, const char *proc_name, const char *cause_fmt, Args &&... args)
 
template<typename... Args>
void log_ul_pdu (srslog::basic_logger &logger, du_ue_index_t ue_index, rnti_t rnti, du_cell_index_t cell_index, const char *ch, const char *cause_fmt, Args &&... args)
 
template<typename... Args>
void log_ul_pdu (srslog::basic_logger &logger, rnti_t rnti, du_cell_index_t cc, const char *cause_fmt, Args &&... args)
 
csi_report_configuration create_csi_report_configuration (const csi_meas_config &csi_meas)
 Returns the Chanel State Information (CSI) report configuration parameters based on CSI-MeasConfig.
 
bool is_valid (const csi_report_configuration &config)
 CSI report configuration validator.
 
bool is_pusch_configured (const csi_meas_config &csi_meas)
 Tells whether the CSI report is configured for PUSCH.
 
unsigned get_pucch_format2_E_total (unsigned nof_prb, unsigned nof_symbols)
 Calculates the total rate matching output sequence length $E_{UCI}$, as per Table 6.3.1.4-1 TS 38.212.
 
float pucch_format2_code_rate (unsigned nof_prb, unsigned nof_symbols, unsigned nof_payload_bits)
 Calculates the effective code rate for a PUCCH Format 2 transmission, for CSI of 1 part only.
 
unsigned get_pucch_format2_max_nof_prbs (unsigned nof_payload_bits, unsigned nof_symbols, float max_code_rate)
 Calculates the number of PRBs required for a given payload size for PUCCH format 2.
 
unsigned get_pucch_format2_nof_prbs (unsigned nof_payload_bits, unsigned max_nof_prbs, unsigned nof_symbols, float max_code_rate)
 Calculates the num. of PRBs (capped to the configured max nof PRBs) given the PUCCH Format 2 payload size.
 
unsigned get_pucch_format2_max_payload (unsigned max_nof_prbs, unsigned nof_symbols, float max_code_rate)
 Calculates the maximum payload for a PUCCH Format 2 transmission.
 
template<typename Integer >
Integer gcd (Integer a, Integer b)
 Calculates the greatest common divisor (GCD) of two integers.
 
template<typename Integer >
Integer lcm (Integer a, Integer b)
 Calculates the least common multiplier (LCM) of two integers.
 
template<typename Integer >
Integer lcm (span< const Integer > values)
 Calculates the least common multiplier (LCM) for a range of integers.
 
constexpr unsigned get_nof_uci_codeblocks (unsigned message_length, unsigned codeword_length)
 Gets the number of codeblocks for a transmission containing a UCI message.
 
constexpr unsigned get_uci_crc_size (unsigned payload_size)
 Gets the number of CRC bits per UCI codeblock.
 
constexpr unsigned get_uci_nof_crc_bits (unsigned message_length, unsigned codeword_length)
 Gets the total number of CRC bits appended in a UCI message, considering segmentation.
 
void fill_e1ap_cu_up_e1_setup_request (cu_up_e1_setup_request &req, const asn1::e1ap::gnb_cu_up_e1_setup_request_s &asn1_req)
 
const charget_cause_str (const asn1::e1ap::cause_c &cause)
 Get string with E1AP error cause.
 
const charget_message_type_str (const asn1::e1ap::e1ap_pdu_c &pdu)
 Extracts message type.
 
expected< uint8_tget_transaction_id (const asn1::e1ap::init_msg_s &out)
 Extracts transaction id of Initiating message.
 
expected< uint8_tget_transaction_id (const asn1::e1ap::successful_outcome_s &out)
 Extracts transaction id of Successful Outcome message.
 
expected< uint8_tget_transaction_id (const asn1::e1ap::unsuccessful_outcome_s &out)
 Extracts transaction id of Unsuccessful Outcome message.
 
expected< uint8_tget_transaction_id (const asn1::e1ap::e1ap_pdu_c &pdu)
 Extracts transaction id of E1AP PDU.
 
expected< gnb_cu_cp_ue_e1ap_id_t > get_gnb_cu_cp_ue_e1ap_id (const asn1::e1ap::init_msg_s &init_msg)
 
expected< gnb_cu_cp_ue_e1ap_id_t > get_gnb_cu_cp_ue_e1ap_id (const asn1::e1ap::successful_outcome_s &success_outcome)
 
expected< gnb_cu_cp_ue_e1ap_id_t > get_gnb_cu_cp_ue_e1ap_id (const asn1::e1ap::unsuccessful_outcome_s &unsuccessful_outcome)
 
expected< gnb_cu_cp_ue_e1ap_id_t > get_gnb_cu_cp_ue_e1ap_id (const asn1::e1ap::e1ap_pdu_c &pdu)
 
expected< gnb_cu_up_ue_e1ap_id_t > get_gnb_cu_up_ue_e1ap_id (const asn1::e1ap::init_msg_s &init_msg)
 
expected< gnb_cu_up_ue_e1ap_id_t > get_gnb_cu_up_ue_e1ap_id (const asn1::e1ap::successful_outcome_s &success_outcome)
 
expected< gnb_cu_up_ue_e1ap_id_t > get_gnb_cu_up_ue_e1ap_id (const asn1::e1ap::unsuccessful_outcome_s &unsuccessful_outcome)
 
expected< gnb_cu_up_ue_e1ap_id_t > get_gnb_cu_up_ue_e1ap_id (const asn1::e1ap::e1ap_pdu_c &pdu)
 
asn1::e1ap::ciphering_algorithm_e ciphering_algorithm_to_e1ap_asn1 (const srsran::security::ciphering_algorithm &ciph_algo)
 Converts type ciphering_algorithm to an E1AP ASN.1 type.
 
srsran::security::ciphering_algorithm e1ap_asn1_to_ciphering_algorithm (const asn1::e1ap::ciphering_algorithm_e &asn1_ciph_algo)
 Converts E1AP ASN.1 type to type and ciphering_algorithm type.
 
asn1::e1ap::integrity_protection_algorithm_e integrity_algorithm_to_e1ap_asn1 (const srsran::security::integrity_algorithm &int_algo)
 Converts type integrity_algorithm to an E1AP ASN.1 type.
 
srsran::security::integrity_algorithm e1ap_asn1_to_integrity_algorithm (const asn1::e1ap::integrity_protection_algorithm_e &asn1_int_algo)
 Converts E1AP ASN.1 type to type and integrity_algorithm type.
 
asn1::e1ap::snssai_s snssai_to_e1ap_asn1 (srsran::s_nssai_t snssai)
 Convert s_nssai_t type to E1AP ASN1 s-NSSAI.
 
srsran::s_nssai_t e1ap_asn1_to_snssai (asn1::e1ap::snssai_s asn1_snssai)
 Convert E1AP ASN1 s-NSSAI to s_nssai_t type.
 
asn1::e1ap::nr_cgi_s nr_cgi_to_e1ap_asn1 (const nr_cell_global_id_t &nr_cgi)
 Convert nr_cell_global_id_t to E1AP ASN.1.
 
asn1::e1ap::sdap_hdr_ul_opts::options sdap_hdr_ul_cfg_to_e1ap_asn1 (sdap_hdr_ul_cfg hdr_cfg)
 
asn1::e1ap::sdap_hdr_dl_opts::options sdap_hdr_dl_cfg_to_e1ap_asn1 (sdap_hdr_dl_cfg hdr_cfg)
 
asn1::e1ap::sdap_cfg_s sdap_config_to_e1ap_asn1 (sdap_config_t sdap_cfg)
 Converts type sdap_config to an E1AP ASN.1 type.
 
sdap_hdr_ul_cfg e1ap_asn1_to_sdap_hdr_ul_cfg (asn1::e1ap::sdap_hdr_ul_opts::options asn1_hdr_ul_opts)
 
sdap_hdr_dl_cfg e1ap_asn1_to_sdap_hdr_dl_cfg (asn1::e1ap::sdap_hdr_dl_opts::options asn1_hdr_dl_opts)
 
sdap_config_t e1ap_asn1_to_sdap_config (asn1::e1ap::sdap_cfg_s asn1_sdap_cfg)
 Converts E1AP ASN.1 type to sdap_config to type.
 
asn1::e1ap::rlc_mode_e rlc_mode_to_asn1 (srsran::pdcp_rlc_mode rlc_mod)
 Converts rlc_mode type to an E1AP ASN.1 type.
 
srsran::pdcp_rlc_mode asn1_to_rlc_mode (asn1::e1ap::rlc_mode_e asn1_rlc_mod)
 Converts E1AP ASN.1 type to an rlc_mode type.
 
asn1::e1ap::pdcp_sn_size_e pdcp_sn_size_to_asn1 (pdcp_sn_size sn_size)
 Convert PDCP SN size from enum to E1AP ASN.1.
 
pdcp_sn_size asn1_to_pdcp_sn_size (asn1::e1ap::pdcp_sn_size_e asn1_sn_size)
 Convert E1AP ASN.1 to PDCP SN size.
 
pdcp_discard_timer asn1_to_pdcp_discard_timer (asn1::e1ap::discard_timer_e asn1_discard_timer)
 Converts E1AP ASN.1 discard timer type to pdcp_discard_timer type.
 
asn1::e1ap::discard_timer_e pdcp_discard_timer_to_asn1 (pdcp_discard_timer discard_timer)
 Converts pdcp_discard_timer type to E1AP ASN.1 discard timer type.
 
pdcp_t_reordering asn1_to_pdcp_t_reordering (asn1::e1ap::t_reordering_e asn1_t_reordering)
 Converts E1AP ASN.1 t-Reordering type to pdcp_t_reordering type.
 
asn1::e1ap::t_reordering_e pdcp_t_reordering_to_asn1 (pdcp_t_reordering t_reordering)
 
asn1::e1ap::pdcp_cfg_s pdcp_config_to_e1ap_asn1 (e1ap_pdcp_config pdcp_cfg)
 Converts type e1ap_pdcp_config to an E1AP ASN.1 type.
 
e1ap_pdcp_config e1ap_asn1_to_pdcp_config (asn1::e1ap::pdcp_cfg_s asn1_pdcp_cfg)
 Converts E1AP ASN.1 type to an e1ap_pdcp_config type.
 
cause_t e1ap_cause_to_cause (asn1::e1ap::cause_c e1ap_cause)
 Convert E1AP Cause to cause_t type.
 
asn1::e1ap::cause_c cause_to_asn1_cause (cause_t cause)
 Convert cause_t type to E1AP ASN.1 cause.
 
bool e1ap_asn1_ng_dl_up_unchanged_to_bool (asn1::e1ap::pdu_session_res_setup_item_s::ng_dl_up_unchanged_e_ ng_dl_up_unchanged)
 Convert E1AP NG DL UP Unchanged to its boolean representation.
 
e1ap_pdcp_count e1ap_asn1_pdcp_count_to_pdcp_count (asn1::e1ap::pdcp_count_s asn1_pdcp_count)
 Convert E1AP ASN.1 PDCP Count to e1ap_pdcp_count type.
 
nr_cell_global_id_t e1ap_asn1_to_cgi (const asn1::e1ap::nr_cgi_s &asn1_cgi)
 Convert E1AP ASN.1 CGI to nr_cell_global_id_t type.
 
e1ap_qos_flow_map_item asn1_e1ap_to_qos_flow_map_item (const asn1::e1ap::qos_flow_map_item_s &asn1_qos_flow_map_item)
 Convert E1AP ASN.1 QoS Flow Map Item to e1ap_qos_flow_map_item type.
 
void e1ap_asn1_to_cell_group_info (std::vector< e1ap_cell_group_info_item > &cell_group_info, const asn1::e1ap::cell_group_info_l &asn1_cell_group_info)
 Convert E1AP ASN.1 Cell Group Info to std::vector<e1ap_cell_group_info_item> type.
 
void e1ap_asn1_to_flow_map_info (slotted_id_vector< qos_flow_id_t, e1ap_qos_flow_qos_param_item > &flow_map_info, const asn1::e1ap::qos_flow_qos_param_list_l &ans1_flow_map_list)
 Convert E1AP ASN.1 QoS Flow Map Info to slotted_id_vector<qos_flow_id_t, e1ap_qos_flow_qos_param_item> type.
 
e1ap_data_forwarding_info_request e1ap_asn1_to_data_forwarding_info_request (const asn1::e1ap::data_forwarding_info_request_s &asn1_data_forwarding_info_request)
 Convert E1AP ASN.1 Data Forwarding Info Request to e1ap_data_forwarding_info_request type.
 
e1ap_pdcp_sn_status_info e1ap_asn1_to_pdcp_sn_status_info (const asn1::e1ap::pdcp_sn_status_info_s &asn1_pdcp_sn_status_info)
 Convert E1AP ASN.1 PDCP SN Status Info to e1ap_pdcp_sn_status_info type.
 
template<typename template_asn1_item >
void e1ap_drb_item_list_to_asn1 (asn1::dyn_array< template_asn1_item > &asn1_drb_item_list, const slotted_id_vector< drb_id_t, e1ap_drb_setup_item_ng_ran > &drb_setup_list_ng_ran)
 
template<typename template_asn1_item >
void e1ap_drb_failed_item_list_to_asn1 (asn1::dyn_array< template_asn1_item > &asn1_drb_item_list, const slotted_id_vector< drb_id_t, e1ap_drb_failed_item_ng_ran > &drb_failed_list_ng_ran)
 
activity_notification_level_t asn1_to_activity_notification_level (const asn1::e1ap::activity_notif_level_e &asn1_activity_notification)
 
void security_result_to_asn1 (asn1::e1ap::security_result_s &asn1obj, const security_result_t &security_result)
 Converts type security_result_t to an ASN.1 type.
 
void asn1_to_security_result (security_result_t &security_result, const asn1::e1ap::security_result_s &asn1obj)
 Converts ASN.1 type to security_result_t.
 
void security_indication_to_asn1 (asn1::e1ap::security_ind_s &asn1obj, const security_indication_t &security_ind)
 Converts type security_indication to an ASN.1 type.
 
void asn1_to_security_indication (security_indication_t &security_ind, const asn1::e1ap::security_ind_s &asn1obj)
 Converts type security_indication to an ASN.1 type.
 
bool get_e2sm_rc_control_style_def (uint32_t style_id, e2sm_rc_control_service_def_t &control_service_def)
 
std::unique_ptr< e2sm_handlercreate_e2sm (std::string e2sm_version, e2sm_kpm_meas_provider &meas_provider)
 create instance of e2sm handler
 
expected< uint8_tget_transaction_id (const asn1::e2ap::init_msg_s &out)
 Extracts transaction id of Initiating message.
 
expected< uint8_tget_transaction_id (const asn1::e2ap::successful_outcome_s &out)
 Extracts transaction id of Successful Outcome message.
 
expected< uint8_tget_transaction_id (const asn1::e2ap::unsuccessful_outcome_s &out)
 Extracts transaction id of Unsuccessful Outcome message.
 
expected< uint8_tget_transaction_id (const asn1::e2ap::e2_ap_pdu_c &pdu)
 Extracts transaction id of E2AP PDU.
 
const charget_message_type_str (const asn1::e2ap::e2_ap_pdu_c &pdu)
 Extracts message type.
 
void fill_ran_function_item (asn1::e2ap::e2setup_request_s &setup, const std::string &ran_oid, e2sm_interface *e2_iface)
 
void fill_asn1_e2ap_setup_request (asn1::e2ap::e2setup_request_s &setup, const e2ap_configuration &e2ap_config, e2sm_manager &e2sm_mngr)
 
bool is_cell_id_required (const e2sm_kpm_metric_t &metric)
 
span< const e2sm_kpm_metric_tget_e2sm_kpm_28_552_metrics ()
 
span< const e2sm_kpm_metric_tget_e2sm_kpm_oran_metrics ()
 
std::string e2sm_kpm_label_2_str (e2sm_kpm_label_enum label)
 
std::string e2sm_kpm_scope_2_str (e2sm_kpm_metric_level_enum level)
 
e2sm_kpm_label_enum asn1_label_2_enum (const asn1::e2sm_kpm::meas_label_s &meas_label)
 
bool operator== (asn1::e2sm_kpm::ueid_c const &lhs, asn1::e2sm_kpm::ueid_c const &rhs)
 
bool operator!= (asn1::e2sm_kpm::ueid_c const &lhs, asn1::e2sm_kpm::ueid_c const &rhs)
 
bool operator< (asn1::e2sm_kpm::ueid_c const &lhs, asn1::e2sm_kpm::ueid_c const &rhs)
 
bool operator== (asn1::e2sm_kpm::ueid_gnb_du_s const &lhs, asn1::e2sm_kpm::ueid_gnb_du_s const &rhs)
 
bool operator< (asn1::e2sm_kpm::ueid_gnb_du_s const &lhs, asn1::e2sm_kpm::ueid_gnb_du_s const &rhs)
 
const charget_cause_str (const asn1::f1ap::cause_c &cause)
 Get string with F1AP error cause.
 
const charget_message_type_str (const asn1::f1ap::f1ap_pdu_c &pdu)
 Extracts message type.
 
expected< uint8_tget_transaction_id (const asn1::f1ap::init_msg_s &out)
 Extracts transaction id of Initiating message.
 
expected< uint8_tget_transaction_id (const asn1::f1ap::successful_outcome_s &out)
 Extracts transaction id of Successful Outcome message.
 
expected< uint8_tget_transaction_id (const asn1::f1ap::unsuccessful_outcome_s &out)
 Extracts transaction id of Unsuccessful Outcome message.
 
expected< uint8_tget_transaction_id (const asn1::f1ap::f1ap_pdu_c &pdu)
 Extracts transaction id of F1AP PDU.
 
expected< gnb_du_ue_f1ap_id_t > get_gnb_du_ue_f1ap_id (const asn1::f1ap::init_msg_s &init_msg)
 
expected< gnb_du_ue_f1ap_id_t > get_gnb_du_ue_f1ap_id (const asn1::f1ap::successful_outcome_s &success_outcome)
 
expected< gnb_du_ue_f1ap_id_t > get_gnb_du_ue_f1ap_id (const asn1::f1ap::unsuccessful_outcome_s &unsuccessful_outcome)
 
expected< gnb_du_ue_f1ap_id_t > get_gnb_du_ue_f1ap_id (const asn1::f1ap::f1ap_pdu_c &pdu)
 
expected< unsignedget_paging_ue_identity_index_value (const asn1::f1ap::paging_s &pdu)
 
expected< uint64_t > get_paging_identity (const asn1::f1ap::paging_s &pdu)
 
expected< paging_identity_typeget_paging_identity_type (const asn1::f1ap::paging_s &pdu)
 
expected< unsignedget_paging_drx_in_nof_rf (const asn1::f1ap::paging_s &pdu)
 
expected< unsignedget_paging_priority (const asn1::f1ap::paging_s &pdu)
 
template<typename Integer >
void set_bitmap_bit (Integer &bitmap, unsigned bit, bool enable)
 Sets the value of a bit in the bitmap. When enable is true, it sets the bit, otherwise it clears the bit.
 
template<typename Integer >
bool check_bitmap_bit (Integer bitmap, unsigned bit)
 Checks the value of a bit in the bitmap and returns a true if the bit is set, otherwise false.
 
float get_sch_to_dmrs_ratio_dB (unsigned nof_cdm_groups_without_data)
 Calculates the ratio between the Physical Shared Channel EPRE and the DM-RS EPRE.
 
csi_report_pusch_size get_csi_report_pusch_size (const csi_report_configuration &config)
 Calculates the Channel State Information (CSI) payload sizes when the CSI report is transmitted in PUSCH.
 
bool validate_pusch_csi_payload (const csi_report_packed &csi1_packed, const csi_report_packed &csi2_packed, const csi_report_configuration &config)
 Checks that the CSI payload carried over PUSCH is valid given a CSI report configuration.
 
csi_report_data csi_report_unpack_pusch (const csi_report_packed &csi1_packed, const csi_report_packed &csi2_packed, const csi_report_configuration &config)
 Unpacks a Channel State Information (CSI) report multiplexed in PUSCH containing CSI Part 1 and Part 2.
 
csi_report_data csi_report_unpack_pusch (const csi_report_packed &csi1_packed, const csi_report_configuration &config)
 Unpacks Channel State Information (CSI) report multiplexed in PUSCH containing CSI Part 1 only.
 
unsigned csi_report_get_nof_csi_rs_antenna_ports (pmi_codebook_type pmi_codebook)
 Gets the number of CSI-RS antenna ports from the PMI codebook type.
 
bool sctp_set_rto_opts (int fd, optional< int > rto_initial, optional< int > rto_min, optional< int > rto_max, srslog::basic_logger &logger)
 
bool sctp_set_init_msg_opts (int fd, optional< int > init_max_attempts, optional< int > max_init_timeo, srslog::basic_logger &logger)
 
bool sockaddr_to_ip_str (const sockaddr *addr, std::string &ip_address, srslog::basic_logger &logger)
 
std::string sock_type_to_str (int type)
 
const charto_string (gtpu_extension_header_type type)
 
const charto_string (gtpu_information_element_type type)
 
bool gtpu_read_teid (uint32_t &teid, const byte_buffer &pdu, srslog::basic_logger &logger)
 
bool gtpu_dissect_pdu (gtpu_dissected_pdu &dissected_pdu, byte_buffer raw_pdu, gtpu_tunnel_logger &logger)
 
bool gtpu_write_header (byte_buffer &pdu, const gtpu_header &header, gtpu_tunnel_logger &logger)
 
void gtpu_write_ie_recovery (byte_buffer &pdu, gtpu_ie_recovery &ie_recovery, gtpu_tunnel_logger &logger)
 
void gtpu_write_ie_private_extension (byte_buffer &pdu, gtpu_ie_private_extension &ie_priv_ext, gtpu_tunnel_logger &logger)
 
bool gtpu_supported_flags_check (const gtpu_header &header, gtpu_tunnel_logger &logger)
 Supported feature helpers.
 
bool gtpu_supported_msg_type_check (const gtpu_header &header, gtpu_tunnel_logger &logger)
 
bool gtpu_extension_header_comprehension_check (const gtpu_extension_header_type &type, gtpu_tunnel_logger &logger)
 
byte_buffer gtpu_extract_t_pdu (gtpu_dissected_pdu &&dissected_pdu)
 
bool gtpu_read_ext_header (bit_decoder &decoder, gtpu_extension_header &ext, gtpu_extension_header_type &next_extension_header_type, gtpu_tunnel_logger &logger)
 
bool gtpu_write_ext_header (bit_encoder &encoder, const gtpu_extension_header &ext, gtpu_extension_header_type next_extension_header_type, gtpu_tunnel_logger &logger)
 
void gtpu_unpack_ext_header_type (bit_decoder &decoder, gtpu_extension_header_type &type)
 
uint16_t gtpu_get_length (const gtpu_header &header, const byte_buffer &sdu)
 
unsigned get_mac_sdu_subheader_size (unsigned payload)
 Derive MAC SDU subheader size in bytes as per TS38.321, Section 6.1.
 
unsigned get_mac_sdu_required_bytes (unsigned payload)
 Derive MAC SDU total size in bytes (includes subheader).
 
unsigned get_mac_sdu_payload_size (unsigned mac_sdu_size)
 
lcg_bsr_report decode_sbsr (byte_buffer_view payload)
 Decode Short BSR.
 
expected< long_bsr_reportdecode_lbsr (bsr_format format, byte_buffer_view payload)
 Decode Long BSR.
 
uint32_t buff_size_field_to_bytes (size_t buff_size_index, bsr_format format)
 
std::unique_ptr< mac_schedulercreate_scheduler (const scheduler_config &sched_cfg)
 Create L2 scheduler object.
 
rnti_t decode_crnti_ce (byte_buffer_view payload)
 Decode C-RNTI MAC CE.
 
template<class T , std::size_t N>
constexpr std::array< std::remove_cv_t< T >, N > to_array (T(&a)[N])
 Helper method to generate an std::array from a C array without needing to derive the size N.
 
template<class T , std::size_t N>
constexpr std::array< std::remove_cv_t< T >, N > to_array (T(&&a)[N])
 
prach_frequency_mapping_information prach_frequency_mapping_get (prach_subcarrier_spacing prach_scs, subcarrier_spacing pusch_scs)
 Gets the PRACH frequency mapping information contained in TS38.211 Table 6.3.3.2-1.
 
constexpr unsigned to_number (pdcp_dc_field dc)
 
constexpr pdcp_dc_field pdcp_pdu_get_dc (uint8_t first_byte)
 Reads the D/C field from the first (header) byte of a PDCP PDU.
 
constexpr uint16_t to_number (pdcp_control_pdu_type type)
 
constexpr pdcp_control_pdu_type pdcp_control_pdu_get_cpt (uint8_t first_byte)
 Reads the CPT field from the first (header) byte of a PDCP control PDU.
 
bool is_simd_addr_aligned (const void *addr, uintptr_t mask)
 
std::shared_ptr< amplitude_controller_factorycreate_amplitude_controller_clipping_factory (const amplitude_controller_clipping_config &config)
 Creates a clipping amplitude controller factory.
 
std::shared_ptr< amplitude_controller_factorycreate_amplitude_controller_scaling_factory (float gain_dB_)
 Creates a scaling amplitude controller factory.
 
std::shared_ptr< lower_phy_downlink_processor_factorycreate_downlink_processor_factory_sw (std::shared_ptr< pdxch_processor_factory > pdxch_proc_factory, std::shared_ptr< amplitude_controller_factory > amplitude_control_factory)
 Creates a software based downlink processor factory.
 
std::shared_ptr< lower_phy_uplink_processor_factorycreate_uplink_processor_factory_sw (std::shared_ptr< prach_processor_factory > prach_proc_factory, std::shared_ptr< puxch_processor_factory > puxch_proc_factory)
 Creates a software based uplink processor factory.
 
std::shared_ptr< ofdm_modulator_factorycreate_ofdm_modulator_factory_generic (ofdm_factory_generic_configuration &config)
 Creates a generic OFDM modulator factory.
 
std::shared_ptr< ofdm_demodulator_factorycreate_ofdm_demodulator_factory_generic (ofdm_factory_generic_configuration &config)
 Creates a generic OFDM demodulator factory.
 
std::shared_ptr< ofdm_prach_demodulator_factorycreate_ofdm_prach_demodulator_factory_sw (std::shared_ptr< dft_processor_factory > dft_factory, sampling_rate srate)
 Creates a software generic PRACH demodulator.
 
std::shared_ptr< pdxch_processor_factorycreate_pdxch_processor_factory_sw (unsigned request_queue_size, std::shared_ptr< ofdm_modulator_factory > ofdm_mod_factory)
 Creates a software based PDxCH processor factory.
 
std::shared_ptr< prach_processor_factorycreate_prach_processor_factory_sw (std::shared_ptr< ofdm_prach_demodulator_factory > ofdm_prach_factory, task_executor &async_task_executor, sampling_rate srate, unsigned max_nof_ports, unsigned max_nof_concurrent_requests)
 Creates a software based PRACH processor factory.
 
std::shared_ptr< puxch_processor_factorycreate_puxch_processor_factory_sw (unsigned request_queue_size, std::shared_ptr< ofdm_demodulator_factory > ofdm_demod_factory)
 Creates a software based PUxCH processor factory.
 
std::unique_ptr< short_block_encodercreate_short_block_encoder ()
 
void demodulate_soft_QAM16 (span< log_likelihood_ratio > llrs, span< const cf_t > symbols, span< const float > noise_vars)
 Soft-demodulates 16-QAM modulation.
 
void demodulate_soft_QAM256 (span< log_likelihood_ratio > llrs, span< const cf_t > symbols, span< const float > noise_vars)
 Soft-demodulates 256-QAM modulation.
 
void demodulate_soft_QAM64 (span< log_likelihood_ratio > llrs, span< const cf_t > symbols, span< const float > noise_vars)
 Soft-demodulates 64-QAM modulation.
 
void demodulate_soft_QPSK (span< log_likelihood_ratio > llrs, span< const cf_t > symbols, span< const float > noise_vars)
 Soft-demodulates QPSK modulation.
 
unsigned compute_interval_idx (float value, float interval_width, unsigned nof_intervals)
 Helper function to calculate an interval index from floating point value.
 
template<typename Table >
float interval_function (float value, float rcp_noise, float interval_width, unsigned nof_intervals, const Table &slopes, const Table &intercepts)
 Applies an interval function.
 
prb_index_list cce_to_prb_mapping_coreset0 (unsigned N_coreset0_start, unsigned N_coreset0_size, unsigned N_symb_coreset, pci_t N_id_cell, unsigned aggregation_level, unsigned cce_index)
 Calculates the PDCCH CCE to PRB mapping for a PDCCH transmission in CORESET0.
 
prb_index_list cce_to_prb_mapping_non_interleaved (unsigned N_bwp_start, const freq_resource_bitmap &freq_resources, unsigned N_symb_coreset, unsigned aggregation_level, unsigned cce_index)
 Calculates the PDCCH CCE to PRB mapping for a non-interleaved PDCCH transmission.
 
prb_index_list cce_to_prb_mapping_interleaved (unsigned N_bwp_start, const freq_resource_bitmap &freq_resources, unsigned N_symb_coreset, unsigned reg_bundle_size, unsigned interleaver_size, unsigned shift_index, unsigned aggregation_level, unsigned cce_index)
 Calculates the PDCCH CCE to PRB mapping for an interleaved PDCCH transmission.
 
uint16_t prach_cyclic_shifts_get (prach_subcarrier_spacing prach_scs, restricted_set_config restricted_set, unsigned zero_correlation_zone)
 Calculates the number of cyclic shifts $N_{CS}$ used in the sequence generation as per TS38.211 Section 6.3.3.1.
 
std::shared_ptr< pusch_decoder_factorycreate_pusch_decoder_factory_sw (pusch_decoder_factory_sw_configuration config)
 
std::shared_ptr< pusch_decoder_factorycreate_pusch_decoder_factory_hw (const pusch_decoder_factory_hw_configuration &config)
 
std::shared_ptr< pusch_demodulator_factorycreate_pusch_demodulator_factory_sw (std::shared_ptr< channel_equalizer_factory > equalizer_factory, std::shared_ptr< channel_modulation_factory > demodulation_factory, std::shared_ptr< pseudo_random_generator_factory > prg_factory, bool enable_evm=false, bool enable_post_eq_sinr=false)
 
std::shared_ptr< pusch_processor_factorycreate_pusch_processor_factory_sw (pusch_processor_factory_sw_configuration &config)
 
std::shared_ptr< pusch_processor_factorycreate_pusch_processor_pool (std::shared_ptr< pusch_processor_factory > factory, unsigned max_nof_processors)
 
std::shared_ptr< ulsch_demultiplex_factorycreate_ulsch_demultiplex_factory_sw ()
 
ulsch_information get_ulsch_information (const ulsch_configuration &config)
 Gets the UL-SCH information for a given PUSCH configuration.
 
unsigned uci_part2_get_size (const uci_payload_type &part1, const uci_part2_size_description &descr)
 Calculates the UCI part 2 from UCI part 1.
 
template<unsigned RX_PORTS>
void equalize_zf_1xn (channel_equalizer::re_list &eq_symbols, channel_equalizer::noise_var_list &noise_vars, const channel_equalizer::re_list &ch_symbols, const channel_equalizer::ch_est_list &ch_estimates, float noise_var_est, float tx_scaling)
 Implementation of a Zero Forcing equalizer for a SIMO 1 X RX_PORTS channel.
 
void equalize_zf_2x2 (channel_equalizer::re_list &eq_symbols, channel_equalizer::noise_var_list &noise_vars, const channel_equalizer::re_list &ch_symbols, const channel_equalizer::ch_est_list &ch_estimates, float noise_var_est, float tx_scaling)
 Implementation of a Zero Forcing equalizer algorithm for a MIMO 2 X 2 channel.
 
void dmrs_sequence_generate (span< cf_t > sequence, pseudo_random_generator &prg, float amplitude, unsigned reference_point_k_rb, unsigned nof_dmrs_per_rb, const bounded_bitset< MAX_RB > &rb_mask)
 Helper function to generate DMRS sequences.
 
std::unique_ptr< radio_factorycreate_plugin_radio_factory (std::string driver_name)
 
ri_li_cqi_cri_sizes get_ri_li_cqi_cri_sizes (pmi_codebook_type pmi_codebook, ri_restriction_type ri_restriction, csi_report_data::ri_type ri, unsigned nof_csi_rs_resources)
 Gets the RI, LI, wideband CQI, and CRI fields bit-width.
 
unsigned csi_report_get_size_pmi (pmi_codebook_type codebook, csi_report_data::ri_type ri)
 Gets the PMI field bit-width.
 
csi_report_data::wideband_cqi_type csi_report_unpack_wideband_cqi (csi_report_packed packed)
 Unpacks wideband CQI.
 
csi_report_pmi csi_report_unpack_pmi (const csi_report_packed &packed, pmi_codebook_type codebook, csi_report_data::ri_type ri)
 Unpacks PMI.
 
csi_report_data::ri_type csi_report_unpack_ri (const csi_report_packed &ri_packed, const ri_restriction_type &ri_restriction)
 Unpacks RI as per TS38.212 Section 6.3.1.1.2. and TS38.214 Section 5.2.2.2.1.
 
unsigned max_nof_monitored_pdcch_candidates (subcarrier_spacing scs)
 Gets the maximum number of monitored PDCCH candidates per slot for a given subcarrier spacing, for a single serving cell, as per TS 38.213, Table 10.1-2.
 
pdcch_candidate_list pdcch_candidates_common_ss_get_lowest_cce (const pdcch_candidates_common_ss_configuration &config)
 Generates a PDCCH candidate list for Common SS as per TS38.213 Section 10.1.
 
pdcch_candidate_list pdcch_candidates_ue_ss_get_lowest_cce (const pdcch_candidates_ue_ss_configuration &config)
 Generates a PDCCH candidate list for UE-Specific SS as per TS38.213 Section 10.1.
 
dlsch_information get_dlsch_information (const dlsch_configuration &config)
 Gets the DL-SCH information for a given PDSCH configuration.
 
pdsch_antenna_ports_mapping get_pdsch_antenna_port_mapping (unsigned nof_layers, unsigned nof_dl_antenna_ports, dmrs_config_type dmrs_cfg_type, dmrs_max_length dmrs_max_len, bool are_both_cws_enabled)
 Returns the PDSCH antenna ports mapping from TS 38.212, tables 7.3.1.2.2-1/2/3/4 based on input configuration.
 
unsigned get_pdsch_antenna_port_mapping_row_index (unsigned nof_layers, unsigned nof_dl_antenna_ports, dmrs_config_type dmrs_cfg_type, dmrs_max_length dmrs_max_len, bool are_both_cws_enabled)
 Returns the PDSCH antenna ports mapping row index in TS 38.212, tables 7.3.1.2.2-1/2/3/4.
 
pusch_tpmi_select_info get_tpmi_select_info (const srs_channel_matrix &channel, float noise_variance)
 Selects the Transmit Precoding Matrix Indicator (TPMI) for each possible number of layers supported by the channel topology.
 
sch_information get_sch_segmentation_info (units::bits tbs, float target_code_rate)
 
unsigned ra_frequency_type1_get_riv (const ra_frequency_type1_configuration &config)
 Calculates the resource indication value $RIV$ as per TS38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink.
 
ra_frequency_type1_configuration ra_frequency_type1_from_riv (unsigned N_bwp_size, unsigned riv)
 Calculates the PRBs from $RIV$ as per TS 38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink.
 
unsigned ra_frequency_type1_special_get_riv (const ra_frequency_type1_special_configuration &config)
 Calculates the resource indication value $RIV$ for special cases as per TS38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink.
 
float tbs_calculator_pdsch_get_scaling_factor (unsigned scaling)
 Converts TB scaling field into the scaling factor S (see TS38.214 Table 5.1.3.2-2).
 
unsigned tbs_calculator_table_find_smallest_not_less_than (unsigned nof_info_prime)
 Gets the smallest TBS in bits (from TS 38.214 Table 5.1.3.2-1) greater than or equal to a given value.
 
unsigned tbs_calculator_calculate (const tbs_calculator_configuration &config)
 Calculates the TBS for a given SCH transmission.
 
optional< srs_configurationsrs_configuration_get (uint8_t c_srs, uint8_t b_srs)
 Gets an SRS configuration.
 
constexpr size_t rlc_am_pdu_header_min_size (rlc_am_sn_size sn_size)
 
constexpr size_t rlc_am_pdu_header_max_size (rlc_am_sn_size sn_size)
 
SRSRAN_NODISCARD bool rlc_am_read_data_pdu_header (const byte_buffer_view &pdu, const rlc_am_sn_size sn_size, rlc_am_pdu_header *header)
 
size_t rlc_am_write_data_pdu_header (span< uint8_t > buf, const rlc_am_pdu_header &header)
 
template<typename Callable >
detail::scope_exit< std::decay_t< Callable > > make_scope_exit (Callable &&callable)
 Defers callable call to scope exit.
 
constexpr size_t rlc_um_pdu_header_size_no_so (rlc_um_sn_size sn_size)
 
constexpr size_t rlc_um_pdu_header_size_with_so (rlc_um_sn_size sn_size)
 
bool rlc_um_read_data_pdu_header (const byte_buffer_view &pdu, const rlc_um_sn_size sn_size, rlc_um_pdu_header *header)
 
size_t rlc_um_nr_packed_length (const rlc_um_pdu_header &header)
 
size_t rlc_um_write_data_pdu_header (span< uint8_t > buf, const rlc_um_pdu_header &header)
 
std::shared_ptr< lower_phy_factorycreate_lower_phy_factory (lower_phy_configuration &config, unsigned max_nof_prach_concurrent_requests)
 Helper class that creates the lower PHY factory using the given configuration.
 
bool is_valid (const ru_generic_configuration &config)
 Helper function that validates the pointer members of the given Radio Unit configuration. Returns true on success, otherwise false.
 
crb_interval get_carrier_rb_dims (const scs_specific_carrier &carrier_cfg)
 Derives Carrier CRB limits from scs-SpecificCarrier.
 
template<typename Other >
bwp_rb_bitmap operator| (const bwp_rb_bitmap &lhs, const Other &rhs)
 
void build_dci_f1_0_si_rnti (dci_dl_info &dci, const bwp_downlink_common &init_dl_bwp, crb_interval crbs, unsigned time_resource, sch_mcs_index mcs_index, uint8_t si_indicator)
 Builds DCI f1_0 for SI-RNTI used in SIBs.
 
void build_dci_f1_0_p_rnti (dci_dl_info &dci, const bwp_downlink_common &init_dl_bwp, crb_interval crbs, unsigned time_resource, sch_mcs_index mcs_index)
 Builds DCI f1_0 for P-RNTI used in PCCHs.
 
void build_dci_f1_0_ra_rnti (dci_dl_info &dci, const bwp_downlink_common &init_dl_bwp, crb_interval crbs, unsigned time_resource, sch_mcs_index mcs_index)
 Builds DCI f1_0 for RA-RNTI used in RAR.
 
void build_dci_f1_0_tc_rnti (dci_dl_info &dci, const bwp_downlink_common &init_dl_bwp, crb_interval crbs, unsigned time_resource, unsigned k1, unsigned pucch_res_indicator, sch_mcs_index mcs_index, uint8_t rv, const dl_harq_process &h_dl)
 Builds DCI f1_0 for TC-RNTI, used for instance in Msg4.
 
void build_dci_f1_0_c_rnti (dci_dl_info &dci, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, crb_interval crbs, unsigned time_resource, unsigned k1, unsigned pucch_res_indicator, unsigned dai, sch_mcs_index mcs_index, uint8_t rv, const dl_harq_process &h_dl)
 Builds DCI f1_0 for C-RNTI.
 
void build_dci_f1_1_c_rnti (dci_dl_info &dci, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, prb_interval prbs, unsigned time_resource, unsigned k1, unsigned pucch_res_indicator, unsigned dai, sch_mcs_index tb1_mcs_index, uint8_t rv, const dl_harq_process &h_dl, unsigned nof_layers)
 Builds DCI f1_1 for C-RNTI.
 
void build_dci_f0_0_tc_rnti (dci_ul_info &dci, const bwp_downlink_common &init_dl_bwp, const bwp_configuration &ul_bwp, const crb_interval &crbs, unsigned time_resource, sch_mcs_index mcs_index, uint8_t rv, const ul_harq_process &h_ul)
 Builds DCI f0_0 for TC-RNTI, used in Msg3 retxs.
 
void build_dci_f0_0_c_rnti (dci_ul_info &dci, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, const crb_interval &crbs, unsigned time_resource, sch_mcs_index mcs_index, uint8_t rv, const ul_harq_process &h_ul)
 Builds DCI f0_0 for C-RNTI.
 
void build_dci_f0_1_c_rnti (dci_ul_info &dci, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, const crb_interval &crbs, unsigned time_resource, sch_mcs_index mcs_index, uint8_t rv, const ul_harq_process &h_ul, unsigned total_dai, unsigned nof_layers)
 Builds DCI f0_1 for C-RNTI.
 
unsigned calculate_nof_dmrs_per_rb (const dmrs_information &dmrs)
 Calculates the number of RE used for DMRS per RB in PDSCH and PUSCH transmissions.
 
dmrs_information make_dmrs_info_common (const pdsch_time_domain_resource_allocation &pdsch_td_cfg, pci_t pci, dmrs_typeA_position dmrs_typeA_pos)
 
dmrs_information make_dmrs_info_dedicated (const pdsch_time_domain_resource_allocation &pdsch_td_cfg, pci_t pci, dmrs_typeA_position dmrs_typeA_pos, const dmrs_downlink_config &dmrs_dl_cfg_ded, unsigned nof_layers, unsigned nof_dl_antenna_ports, bool are_both_cws_enabled)
 
dmrs_information make_dmrs_info_common (span< const pdsch_time_domain_resource_allocation > pdsch_td_list, uint8_t time_resource, pci_t pci, dmrs_typeA_position dmrs_typeA_pos)
 
dmrs_information make_dmrs_info_common (const pusch_time_domain_resource_allocation &pusch_td_cfg, pci_t pci, dmrs_typeA_position dmrs_typeA_pos)
 
dmrs_information make_dmrs_info_dedicated (const pusch_time_domain_resource_allocation &pusch_td_cfg, pci_t pci, dmrs_typeA_position dmrs_typeA_pos, const dmrs_uplink_config &dmrs_ul_cfg, unsigned nof_layers, unsigned nof_ul_antenna_ports, bool are_both_cws_enabled)
 
dmrs_information make_dmrs_info_common (const pusch_config_common &pusch_cfg, uint8_t time_resource, pci_t pci, dmrs_typeA_position dmrs_typeA_pos)
 
slot_point precompute_type0_pdcch_css_n0 (uint8_t searchspace0, uint8_t coreset0, const cell_configuration &cell_cfg, subcarrier_spacing scs_common, unsigned ssb_index)
 Computes the Type0-PDCCH CSS n0 slot for each beam [TS 38.213, Section 13].
 
slot_point precompute_type0_pdcch_css_n0_plus_1 (uint8_t searchspace0, uint8_t coreset0, const cell_configuration &cell_cfg, subcarrier_spacing scs_common, unsigned ssb_index)
 Computes the Type0-PDCCH CSS n0 + 1 slot for each beam [TS 38.213, Section 13].
 
pdsch_default_time_allocation_config pdsch_default_time_allocation_default_A_get (cyclic_prefix cp, unsigned row_index, dmrs_typeA_position dmrs_pos)
 Determines the default PDSCH time-domain resource allocation A.
 
span< const pdsch_time_domain_resource_allocationpdsch_default_time_allocations_default_A_table (cyclic_prefix cp, dmrs_typeA_position dmrs_pos)
 Determines the table of default PDSCH time-domain resource allocation A.
 
span< const pdsch_time_domain_resource_allocationget_c_rnti_pdsch_time_domain_list (const search_space_configuration &ss_cfg, const bwp_downlink_common &active_bwp_dl_common, const bwp_downlink_dedicated *active_bwp_dl_ded, dmrs_typeA_position dmrs_typeA_pos)
 Determines the time domain resource allocation table to be used for PDSCH as per TS 38.214, clause 5.1.2.1.1.
 
span< const pdsch_time_domain_resource_allocationget_si_rnti_pdsch_time_domain_list (cyclic_prefix cp, dmrs_typeA_position dmrs_typeA_pos)
 Determines the time domain resource allocation table to be used for PDSCH scheduled with SI-RNTI Type0 common as per TS 38.214, clause 5.1.2.1.1-1.
 
span< const pdsch_time_domain_resource_allocationget_si_rnti_type0A_common_pdsch_time_domain_list (const pdsch_config_common &pdsch_common, cyclic_prefix cp, dmrs_typeA_position dmrs_typeA_pos)
 Determines the time domain resource allocation table to be used for PDSCH scheduled with SI-RNTI Type0A common as per TS 38.214, clause 5.1.2.1.1-1.
 
span< const pdsch_time_domain_resource_allocationget_ra_rnti_pdsch_time_domain_list (const pdsch_config_common &pdsch_common, cyclic_prefix cp, dmrs_typeA_position dmrs_typeA_pos)
 Determines the time domain resource allocation table to be used for PDSCH scheduled with RA-RNTI as per TS 38.214, clause 5.1.2.1.1-1.
 
sch_prbs_tbs get_nof_prbs (const prbs_calculator_sch_config &sch_config, unsigned max_nof_available_rbs=273U)
 Computes the required number of PRBs necessary to transmit a given payload size.
 
unsigned estimate_required_nof_prbs (const prbs_calculator_sch_config &sch_config, unsigned max_nof_available_rbs=273U)
 Computes a coarse estimate of the number of required PRBs to transmit a given payload size. This estimate might lead to a TBS that is smaller or larger than the given payload size.
 
pdsch_config_params get_pdsch_config_f1_0_tc_rnti (const cell_configuration &cell_cfg, const pdsch_time_domain_resource_allocation &pdsch_td_cfg)
 Fetches the PDSCH parameters needed for PDSCH PDU for DCI format 1_0, scrambled by TC-RNTI.
 
pdsch_config_params get_pdsch_config_f1_0_c_rnti (const ue_cell_configuration &ue_cell_cfg, const pdsch_time_domain_resource_allocation &pdsch_td_cfg)
 Fetches the PDSCH parameters needed for PUSCH PDU for DCI format 1_0, scrambled by C-RNTI.
 
pdsch_config_params get_pdsch_config_f1_1_c_rnti (const ue_cell_configuration &ue_cell_cfg, const pdsch_time_domain_resource_allocation &pdsch_td_cfg, unsigned nof_layers)
 Fetches the PDSCH parameters needed for PUSCH PDU for DCI format 1_1, scrambled by C-RNTI.
 
pusch_config_params get_pusch_config_f0_0_tc_rnti (const cell_configuration &cell_cfg, const pusch_time_domain_resource_allocation &pusch_td_cfg)
 Fetches the PUSCH parameters needed for PUSCH PDU for DCI format 0_0, scrambled by TC-RNTI.
 
pusch_config_params get_pusch_config_f0_0_c_rnti (const ue_cell_configuration &ue_cell_cfg, const bwp_uplink_common &ul_bwp, const pusch_time_domain_resource_allocation &pusch_td_cfg, const unsigned nof_harq_ack_bits, bool is_csi_report_slot)
 Fetches the PUSCH parameters needed for PUSCH PDU for DCI format 0_0, scrambled by C-RNTI.
 
pusch_config_params get_pusch_config_f0_1_c_rnti (const ue_cell_configuration &ue_cell_cfg, const pusch_time_domain_resource_allocation &pusch_td_cfg, unsigned nof_layers, const unsigned nof_harq_ack_bits, bool is_csi_report_slot)
 Fetches the PUSCH parameters needed for PUSCH PDU for DCI format 0_1, scrambled by C-RNTI.
 
void build_pdsch_f1_0_si_rnti (pdsch_information &pdsch, const cell_configuration &cell_cfg, unsigned tbs_bytes, const dci_1_0_si_rnti_configuration &dci_cfg, const crb_interval &crbs, const ofdm_symbol_range &symbols, const dmrs_information &dmrs_info)
 Builds PDSCH PDU for DCI format 1_0, scrambled by SI-RNTI.
 
void build_pdsch_f1_0_p_rnti (pdsch_information &pdsch, const cell_configuration &cell_cfg, unsigned tbs_bytes, const dci_1_0_p_rnti_configuration &dci_cfg, const crb_interval &crbs, const ofdm_symbol_range &symbols, const dmrs_information &dmrs_info)
 Builds PDSCH PDU for DCI format 1_0, scrambled by P-RNTI.
 
void build_pdsch_f1_0_ra_rnti (pdsch_information &pdsch, unsigned tbs_bytes, rnti_t rnti, const cell_configuration &cell_cfg, const dci_1_0_ra_rnti_configuration &dci_cfg, const crb_interval &crbs, const dmrs_information &dmrs_info)
 Builds PDSCH PDU for DCI format 1_0, scrambled by RA-RNTI.
 
void build_pdsch_f1_0_tc_rnti (pdsch_information &pdsch, const pdsch_config_params &pdsch_cfg, unsigned tbs_bytes, rnti_t rnti, const cell_configuration &cell_cfg, const dci_1_0_tc_rnti_configuration &dci_cfg, const crb_interval &crbs, bool is_new_data)
 Builds PDSCH PDU for DCI format 1_0, scrambled by TC-RNTI.
 
void build_pdsch_f1_0_c_rnti (pdsch_information &pdsch, const pdsch_config_params &pdsch_cfg, unsigned tbs_bytes, rnti_t rnti, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, const dci_1_0_c_rnti_configuration &dci_cfg, const crb_interval &crbs, bool is_new_data)
 Builds PDSCH PDU for DCI format 1_0, scrambled by C-RNTI.
 
void build_pdsch_f1_1_c_rnti (pdsch_information &pdsch, const pdsch_config_params &pdsch_cfg, sch_mcs_tbs mcs_tbs_info, rnti_t rnti, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, const dci_1_1_configuration &dci_cfg, const crb_interval &crbs, const dl_harq_process &h_dl, const ue_channel_state_manager &cs_mgr)
 Builds PDSCH PDU for DCI format 1_1, scrambled by C-RNTI.
 
void build_pusch_f0_0_tc_rnti (pusch_information &pusch, const pusch_config_params &pusch_cfg, unsigned tbs_bytes, rnti_t rnti, const cell_configuration &cell_cfg, const dci_0_0_tc_rnti_configuration &dci_cfg, const crb_interval &crbs, bool is_new_data)
 Builds PUSCH PDU for DCI format 0_0, scrambled by TC-RNTI.
 
void build_pusch_f0_0_c_rnti (pusch_information &pusch, rnti_t rnti, const pusch_config_params &pusch_cfg, unsigned tbs_bytes, const cell_configuration &cell_cfg, const bwp_uplink_common &ul_bwp, const dci_0_0_c_rnti_configuration &dci_cfg, const crb_interval &crbs, bool is_new_data)
 Builds PUSCH PDU for DCI format 0_0, scrambled by C-RNTI.
 
void build_pusch_f0_1_c_rnti (pusch_information &pusch, rnti_t rnti, const pusch_config_params &pusch_cfg, sch_mcs_tbs mcs_tbs_info, const ue_cell_configuration &ue_cell_cfg, search_space_id ss_id, const dci_0_1_configuration &dci_cfg, const crb_interval &crbs, const ul_harq_process &h_ul)
 Builds PUSCH PDU for DCI format 0_1, scrambled by C-RNTI.
 
bool is_nth_ssb_beam_active (uint64_t ssb_bitmap, unsigned ssb_index)
 Helper function that determines from SSB bitmap whether n-th beam is used.
 
unsigned get_msg3_delay (const pusch_time_domain_resource_allocation &pusch_td_res_alloc, subcarrier_spacing pusch_scs)
 
uint16_t get_ra_rnti (unsigned slot_index, unsigned symbol_index, unsigned frequency_index, bool is_sul=false)
 Computes the RA-RNTI based on PRACH parameters, as per TS 38.321, Section 5.1.3.
 
void save_harq_alloc_params (ul_harq_process::alloc_params &ul_alloc, bwp_id_t bwp_id, dci_ul_rnti_config_type dci_cfg_type, unsigned time_resource, const pusch_information &pusch)
 Helper function to fill HARQ allocation grant parameters.
 
dmrs_symbol_mask pdsch_dmrs_symbol_mask_mapping_type_A_single_get (const pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration &config)
 Calculates the DMRS for PDSCH symbol mask for single duration.
 
optional< sch_mcs_tbscompute_dl_mcs_tbs (const pdsch_config_params &pdsch_params, const ue_cell_configuration &ue_cell_cfg, sch_mcs_index max_mcs, unsigned nof_prbs)
 Computes the PDSCH MCS and TBS such that the effective code rate does not exceed 0.95.
 
optional< sch_mcs_tbscompute_ul_mcs_tbs (const pusch_config_params &pusch_params, const ue_cell_configuration &ue_cell_cfg, sch_mcs_index max_mcs, unsigned nof_prbs)
 Computes the PUSCH MCS and TBS such that the effective code rate does not exceed 0.95.
 
span< const pusch_time_domain_resource_allocationget_pusch_time_domain_resource_table (const pusch_config_common &pusch_cfg)
 
unsigned get_coreset_nof_prbs (const coreset_configuration &cs_cfg)
 Computes the number of RBs used to represent the CORESET.
 
unsigned get_coreset_end_crb (const coreset_configuration &cs_cfg)
 Computes the highest RB used by the CORESET.
 
crb_interval get_coreset_crbs (const coreset_configuration &cs_cfg)
 Computes the CRB interval that delimits CORESET.
 
crb_interval get_coreset0_crbs (const pdcch_config_common &pdcch_cfg)
 Computes the CRB interval that delimits CORESET#0.
 
pusch_default_time_allocation_config pusch_default_time_allocation_default_A_get (cyclic_prefix cp, unsigned row_index, subcarrier_spacing scs)
 Determines the default PUSCH time-domain resource allocation A.
 
span< const pusch_time_domain_resource_allocationpusch_default_time_allocations_default_A_table (cyclic_prefix cp, subcarrier_spacing scs)
 Determines the table of default PUSCH time-domain resource allocation A.
 
span< const pusch_time_domain_resource_allocationget_c_rnti_pusch_time_domain_list (const search_space_configuration &ss_cfg, const bwp_uplink_common &active_bwp_ul_common, const bwp_uplink_dedicated *active_bwp_ul_ded)
 Determines the time domain resource allocation table to be used for PUSCH as per TS 38.214, clause 6.1.2.1.1.
 
unsigned get_scrambling_n_ID (pci_t pci, const coreset_configuration &cs_cfg, const search_space_configuration &ss_cfg)
 
unsigned get_scrambling_n_RNTI (rnti_t rnti, const coreset_configuration &cs_cfg, const search_space_configuration &ss_cfg)
 
unsigned get_N_ID_dmrs (pci_t pci, const coreset_configuration &cs_cfg)
 Calculates $N_{ID}$ as per TS38.211, 7.4.1.3.1.
 
unsigned prb_to_crb (const bwp_configuration &bwp_cfg, unsigned prb)
 Convert PRB within a BWP into a Common RB, which use pointA as reference point. The CRB and PRB are assumed to have the same numerology of the provided BWP configuration. The existence of a CORESET#0 may also affect the rules for CRB<->PRB conversion.
 
crb_interval prb_to_crb (const bwp_configuration &bwp_cfg, prb_interval prbs)
 
unsigned crb_to_prb (const bwp_configuration &bwp_cfg, unsigned crb)
 Convert CRB within a BWP into a PRB. The CRB and PRB are assumed to use the same numerology as reference.
 
prb_interval crb_to_prb (const bwp_configuration &bwp_cfg, crb_interval crbs)
 
constexpr unsigned get_allocator_ring_size_gt_min (unsigned minimum_value)
 Retrieves the resource grid allocator ring size greater than given minimum value.
 
std::unique_ptr< scheduler_policycreate_scheduler_strategy (const scheduler_strategy_params &params)
 
unsigned get_pucch_default_resource_index (unsigned n_cce, unsigned nof_cce, unsigned delta_pri)
 Calculates the default PUCCH resource index $r_{PUCCH}$.
 
std::pair< unsigned, unsignedget_pucch_default_prb_index (unsigned r_pucch, unsigned rb_bwp_offset, unsigned nof_cs, unsigned N_bwp_size)
 Gets the PRB indexes for PUCCH resource before dedicated PUCCH as per TS38.213 Section 9.2.1.
 
unsigned get_pucch_default_cyclic_shift (unsigned r_pucch, unsigned nof_cs)
 Gets the PUCCH cyclic shift for PUCCH resource before dedicated PUCCH as per TS38.213 Section 9.2.1.
 
pucch_default_resource get_pucch_default_resource (unsigned row_index, unsigned N_bwp_size)
 Gets the PUCCH resource parameters before dedicated PUCCH resources are configured.
 
optional< sch_mcs_indexmap_cqi_to_mcs (unsigned cqi, pdsch_mcs_table mcs_table)
 Performs CQI to MCS mapping - for DL.
 
sch_mcs_index map_snr_to_mcs_ul (double snr, pusch_mcs_table mcs_table)
 Maps the (PUSCH) SNR to a given MCS for PUSCH.
 
sch_mcs_index get_max_mcs_ul (pusch_mcs_table mcs_table)
 Retrieves the maximum MCS value for a given MCS table.
 
aggregation_level map_cqi_to_aggregation_level (cqi_value cqi, cqi_table_t cqi_table, span< const uint8_t > pdcch_candidates, unsigned nof_dci_bits)
 Computes PDCCH aggregation level to use based on the input parameters.
 
dmrs_symbol_mask pusch_dmrs_symbol_mask_mapping_type_A_single_get (const pusch_dmrs_symbol_mask_mapping_type_A_single_configuration &config)
 Calculates the DM-RS for PUSCH symbol mask for single duration.
 
unsigned allocate_mac_sdus (dl_msg_tb_info &tb_info, dl_logical_channel_manager &lch_mng, unsigned total_tbs)
 Allocate MAC SDUs and corresponding MAC subPDU subheaders.
 
unsigned allocate_mac_ces (dl_msg_tb_info &tb_info, dl_logical_channel_manager &lch_mng, unsigned total_tbs)
 Allocate MAC subPDUs for pending MAC CEs.
 
unsigned allocate_ue_con_res_id_mac_ce (dl_msg_tb_info &tb_info, dl_logical_channel_manager &lch_mng, unsigned total_tbs)
 Allocate MAC subPDUs for pending UE Contention Resolution Identity MAC CE.
 
constexpr bool is_alignment_valid (std::size_t alignment)
 Checks if alignment is power of 2.
 
constexpr bool is_aligned (std::uintptr_t ptr, std::size_t alignment)
 Checks whether the pointer is set with the correct alignment.
 
bool is_aligned (void *ptr, std::size_t alignment)
 
constexpr voidadvance_ptr (void *pos, std::size_t sz)
 Moves the pointer by the given size in bytes.
 
constexpr std::uintptr_t align_next (std::uintptr_t pos, std::size_t alignment)
 Moves the pointer to the next aligned position.
 
voidalign_next (void *pos, std::size_t alignment)
 
template<typename Exec , typename Tracer >
executor_tracer< Exec, Tracermake_trace_executor (const std::string &name, Exec &&exec, Tracer &tracer)
 
template<typename Exec , typename Tracer >
std::unique_ptr< task_executormake_trace_executor_ptr (const std::string &name, Exec &&exec, Tracer &tracer)
 
template<task_priority Priority, concurrent_queue_policy... QueuePolicies>
auto make_priority_task_worker_executor (priority_task_worker< QueuePolicies... > &worker)
 Create task executor with Priority for priority_multiqueue_task_worker.
 
template<task_priority Priority, concurrent_queue_policy... QueuePolicies>
std::unique_ptr< task_executormake_priority_task_executor_ptr (priority_task_worker< QueuePolicies... > &worker)
 Create general task executor pointer with Priority for priority_multiqueue_task_worker.
 
template<typename Func , concurrent_queue_policy... QueuePolicies>
void visit_executor (priority_task_worker< QueuePolicies... > &worker, task_priority priority, const Func &func)
 Create general task executor pointer with Priority for priority_multiqueue_task_worker.
 
template<concurrent_queue_policy... QueuePolicies>
std::unique_ptr< task_executormake_priority_task_executor_ptr (priority_task_worker< QueuePolicies... > &worker, task_priority priority)
 Create general task executor pointer with Priority for priority_multiqueue_task_worker.
 
template<concurrent_queue_policy QueuePolicy, typename OutExec >
std::unique_ptr< task_strand< OutExec, QueuePolicy > > make_task_strand_ptr (OutExec &&out_exec, unsigned strand_queue_size)
 Creates a task strand instance given a list of parameters.
 
template<concurrent_queue_policy... QueuePolicies, typename OutExec >
std::unique_ptr< task_strand< OutExec, QueuePolicies... > > make_task_strand_ptr (OutExec &&out_exec, span< const unsigned > strand_queue_sizes)
 
template<concurrent_queue_policy QueuePolicy, typename OutExec >
std::unique_ptr< task_executormake_strand_executor_ptr (OutExec &&out_exec, unsigned queue_size)
 Make a strand executor that manages the lifetime of a strand with a single queue.
 
template<concurrent_queue_policy... QueuePolicies, typename OutExec >
std::vector< std::unique_ptr< task_executor > > make_strand_executor_ptrs (OutExec &&out_exec, span< const unsigned > qsizes)
 Create all executors associated with a given strand. The executors will manage the strand lifetime via reference counting.
 
template<typename OutExec >
std::vector< std::unique_ptr< task_executor > > make_strand_executor_ptrs (OutExec &&out_exec, span< const concurrent_queue_params > strand_queues)
 Creates a list of task executors associated with a strand that points to the provided out executor.
 
template<enqueue_priority Priority, concurrent_queue_policy... QueuePolicies>
auto make_priority_task_worker_pool_executor (task_worker_pool< QueuePolicies... > &worker)
 Create task executor with Priority for task_worker_pool that supports multiple priorities.
 
template<enqueue_priority Priority, concurrent_queue_policy... QueuePolicies>
std::unique_ptr< task_executormake_priority_task_worker_pool_executor_ptr (task_worker_pool< QueuePolicies... > &worker)
 Create general task executor pointer with Priority for task_worker_pool that supports multiple priorities.
 
template<typename Func , concurrent_queue_policy... QueuePolicies>
void visit_executor (task_worker_pool< QueuePolicies... > &worker, enqueue_priority priority, const Func &func)
 Create general task executor pointer with Priority for priority_task_worker_pool.
 
template<typename ComplexType1 >
bool operator== (const complex_normal_distribution< ComplexType1 > &distr1, const complex_normal_distribution< ComplexType1 > &distr2)
 
template<typename ComplexType >
bool operator!= (const complex_normal_distribution< ComplexType > &distr1, const complex_normal_distribution< ComplexType > &distr2)
 Checks whether two complex normal distributions are different.
 
constexpr uint8_t psup_pdu_type_to_uint (psup_pdu_type pdu_type)
 Convert PSUP PDU Type to integer.
 
constexpr psup_pdu_type uint_to_psup_pdu_type (uint8_t num)
 Convert integer to PSUP PDU Type.
 
constexpr uint8_t psup_ppi_to_uint (psup_ppi ppi)
 Convert PSUP Paging Policy Indicator to integer.
 
constexpr psup_ppi uint_to_psup_ppi (uint8_t num)
 Convert integer to PSUP Paging Policy Indicator.
 
template<typename T >
std::enable_if_t<!std::is_trivially_copyable< T >::value||(sizeof(T) > sizeof(T *))> do_not_optimize (T const &value)
 
template<typename T >
std::enable_if_t< std::is_trivially_copyable< T >::value &&(sizeof(T)<=sizeof(T *))> do_not_optimize (T &value)
 
template<typename T >
std::enable_if_t<!std::is_trivially_copyable< T >::value||(sizeof(T) > sizeof(T *))> do_not_optimize (T &value)
 
template<typename T >
bool print (const char *filename, span< const T > data, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::out)
 Writes the given span into a file in binary format.
 
ph_db_range ph_to_db_range (unsigned ph)
 Converts PH value reported by UE to dB interval based on mapping defined in Table 10.1.17.1-1 of TS 38.133.
 
p_cmax_dbm_range p_cmax_to_dbm_range (unsigned p_cmax)
 Converts P_CMAX,f,c value reported by UE to dBm interval based on mapping defined in Table 10.1.18.1-1 of TS 38.133.
 
phr_report decode_se_phr (byte_buffer_view payload)
 Decode Single Entry PHR.
 
constexpr size_t pdcp_data_pdu_header_size (pdcp_sn_size sn_size)
 
constexpr uint32_t pdcp_window_size (pdcp_sn_size sn_size)
 
constexpr uint32_t pdcp_compute_sn (uint32_t count, pdcp_sn_size sn_size)
 
constexpr uint32_t pdcp_compute_hfn (uint32_t count, pdcp_sn_size sn_size)
 
constexpr uint32_t pdcp_compute_count (uint32_t hfn, uint32_t sn, pdcp_sn_size sn_size)
 
constexpr uint32_t pdcp_sn_cardinality (pdcp_sn_size sn_size)
 

Variables

const size_t NOF_NUMEROLOGIES = 5
 Number of possible numerology values.
 
const std::array< nr_band, 60 > all_nr_bands_fr1
 
constexpr size_t default_unique_function_buffer_size = 32
 Size of the small buffer embedded in "unique_function<R(Args...)>", used to store functors without calling "new".
 
constexpr size_t default_unique_task_buffer_size = 64
 
constexpr uint16_t NGAP_PPID = 60
 
constexpr uint16_t E2_CP_PPID = 70
 
constexpr uint16_t E2_UP_PPID = 71
 
constexpr uint16_t E2_DU_PPID = 72
 
constexpr nullopt_t nullopt {0}
 Initializer for empty optional objects.
 
constexpr uint8_t PCAP_RLC_TM_MODE = 1
 
constexpr uint8_t PCAP_RLC_UM_MODE = 2
 
constexpr uint8_t PCAP_RLC_AM_MODE = 4
 
constexpr uint8_t PCAP_RLC_DIRECTION_UPLINK = 0
 
constexpr uint8_t PCAP_RLC_DIRECTION_DOWNLINK = 1
 
constexpr uint8_t PCAP_RLC_BEARER_TYPE_CCCH = 1
 
constexpr uint8_t PCAP_RLC_BEARER_TYPE_SRB = 4
 
constexpr uint8_t PCAP_RLC_BEARER_TYPE_DRB = 5
 
constexpr uint8_t PCAP_RLC_TM_SN_LENGTH_0_BITS = 0
 
constexpr uint8_t PCAP_RLC_UM_SN_LENGTH_6_BITS = 6
 
constexpr uint8_t PCAP_RLC_UM_SN_LENGTH_12_BITS = 12
 
constexpr uint8_t PCAP_RLC_AM_SN_LENGTH_12_BITS = 12
 
constexpr uint8_t PCAP_RLC_AM_SN_LENGTH_18_BITS = 18
 
constexpr uint32_t NOF_SUBFRAMES_PER_FRAME = 10
 Number of subframers per frame. This constant doesn't depend on the numerology used.
 
constexpr size_t NOF_SFNS = 1024
 Number of system Frame Number values.
 
constexpr uint32_t SUBFRAME_DURATION_MSEC = 1
 Duration of a subframe in milliseconds.
 
const unsigned NOF_SSB_PRBS = 20
 
constexpr lcid_t MAX_LCID = LCID_MAX_DRB
 
constexpr std::size_t MAX_NOF_SRBS = 4
 
constexpr pci_t MIN_PCI = 0
 
constexpr pci_t MAX_PCI = 1007
 
constexpr pci_t INVALID_PCI = MAX_PCI + 1
 
constexpr size_t MAX_NOF_SEARCH_SPACE_PER_BWP = 10
 
constexpr size_t MAX_NOF_PUCCH_RESOURCE_SETS = 4
 
constexpr size_t MAX_NOF_PUCCH_RESOURCES = 128
 
constexpr size_t MAX_NOF_PUCCH_RESOURCES_PER_PUCCH_RESOURCE_SET = 32
 
constexpr std::size_t MAX_NOF_PRBS = 275
 
constexpr std::size_t NOF_SUBCARRIERS_PER_RB = 12
 See TS 38.211, 4.4.4.1 - Resource Blocks, General.
 
const unsigned NOF_OFDM_SYM_PER_SLOT_NORMAL_CP = 14
 The number of OFDM symbols per slot is constant for all numerologies.
 
const unsigned NOF_OFDM_SYM_PER_SLOT_EXTENDED_CP = 12
 
constexpr size_t MAX_NOF_CORESETS_PER_BWP = 3
 
const size_t MAX_NOF_LAYERS = 2
 Maximum number of layers (implementation-defined)
 
const unsigned FR1_MAX_FREQUENCY_ARFCN = 875000
 
const unsigned CUTOFF_FREQ_ARFCN_CASE_A_B_C = 600000
 The cutoff frequency for case A, B and C paired is 3GHz, corresponding to 600000 ARFCN (TS 38.213, Section 4.1).
 
const unsigned CUTOFF_FREQ_ARFCN_CASE_C_UNPAIRED = 376000
 The cutoff frequency for case C unpaired is 1.88GHz, corresponding to 376000 ARFCN (TS 38.213, Section 4.1).
 
const unsigned NOF_SSB_OFDM_SYMBOLS = 4
 
const unsigned SIB1_PERIODICITY = 160
 
const unsigned MAX_NUM_BEAMS = 8
 
const unsigned SCHEDULER_MAX_K0 = 15
 [Implementation defined] Maximum allowed slot offset between DCI and its scheduled PDSCH. Values {0,..,32}.
 
const unsigned SCHEDULER_MAX_K1 = 15
 [Implementation defined] Maximum allowed slot offset between PDSCH to the DL ACK/NACK. Values {0,..,15}.
 
const unsigned SCHEDULER_MAX_K2 = 15
 [Implementation defined] Maximum allowed slot offset between DCI and its scheduled first PUSCH. Values {0,..,32}.
 
const unsigned NTN_CELL_SPECIFIC_KOFFSET_MAX = 512
 Maximum value of NTN cell specific Koffset. See TS 38.331.
 
const unsigned MAX_MSG3_DELTA = 6
 Maximum value of Msg delta. See table 6.1.2.1.1-5, in TS 38.214.
 
const unsigned MAX_NOF_PDSCH_TD_RESOURCE_ALLOCATIONS = 16
 Maximum number of PDSCH time domain resource allocations. See TS 38.331, maxNrofDL-Allocations.
 
constexpr size_t MAX_NOF_SR_RESOURCES = 8
 
constexpr uint16_t pdcp_max_sdu_size = 9000
 Maximum supported PDCP SDU size, see TS 38.323, section 4.3.1.
 
const uint32_t pdcp_tx_default_max_count_notify = 0xc0000000
 
const uint32_t pdcp_tx_default_max_count_hard = UINT32_MAX - 1
 
const uint32_t pdcp_rx_default_max_count_notify = 0xc0000000
 
const uint32_t pdcp_rx_default_max_count_hard = 0xd0000000
 
constexpr size_t NOF_BEAMS = 64
 Maximum number of SS/PBCH beams in a SS/PBCH period as per TS38.213 Section 4.1.
 
constexpr unsigned GTPU_PORT = 2152
 
constexpr uint8_t PCAP_FDD_RADIO = 1
 
constexpr uint8_t PCAP_TDD_RADIO = 2
 
constexpr uint8_t PCAP_DIRECTION_UPLINK = 0
 
constexpr uint8_t PCAP_DIRECTION_DOWNLINK = 1
 
constexpr uint8_t PCAP_NO_RNTI = 0
 
constexpr uint8_t PCAP_P_RNTI = 1
 
constexpr uint8_t PCAP_RA_RNTI = 2
 
constexpr uint8_t PCAP_C_RNTI = 3
 
constexpr uint8_t PCAP_SI_RNTI = 4
 
constexpr uint8_t PCAP_SPS_RNTI = 5
 
constexpr uint8_t PCAP_M_RNTI = 6
 
constexpr uint8_t PCAP_SL_BCH_RNTI = 7
 
constexpr uint8_t PCAP_SL_RNTI = 8
 
constexpr uint8_t PCAP_SC_RNTI = 9
 
constexpr uint8_t PCAP_G_RNTI = 10
 
const size_t NOF_AGGREGATION_LEVELS = 5
 Number of possible aggregation levels.
 
constexpr int MAX_UE_METRICS = 10
 
constexpr protocol_transaction_id_t invalid_protocol_transaction_id
 Invalid transaction id.
 
const unsigned MAX_NOF_TAGS = 4
 maxNrofTAGs, TS 38.331.
 
constexpr gtpu_teid_t GTPU_PATH_MANAGEMENT_TEID = int_to_gtpu_teid(0)
 TEID for path management messages via GTP-U, e.g. echo request, echo response,...
 
constexpr uint8_t nru_max_nof_pdcp_sn_discard_blocks = 16
 
constexpr uint8_t nru_max_nof_lost_nru_sn_ranges = 1
 
const size_t MAX_NOF_RBGS = 18
 
const size_t MAX_SI_MESSAGES = 32
 Maximum number of SI messages that can be scheduled as per TS 38.331, "maxSI-Message".
 
const size_t NOF_E2SM_RC_CTRL_SERVICE_STYLES = 11
 Number of E2SM-RC Control Styles defined in O-RAN.WG3.E2SM-RC-R003-v03.00.
 
const size_t NOF_3GPP_TS_28_552_METRICS = 278
 Number of E2SM-KPM metrics defined in 3GPP TS 28.552.
 
const size_t NOF_ORAN_E2SM_KPM_METRICS = 9
 Number of E2SM-KPM metrics defined in O-RAN.WG3.E2SM-KPM-R003-v3.00.
 
constexpr bool L1_TRACE_ENABLED = false
 Set to true for enabling layer 1 trace.
 
constexpr bool L2_TRACE_ENABLED = false
 Set to true for enabling layer 2 trace.
 
file_event_tracer< L1_TRACE_ENABLEDl1_tracer
 L1 event tracing. This tracer is used to analyze latencies in the L1 processing.
 
file_event_tracer< L2_TRACE_ENABLEDl2_tracer
 L2 event tracing. This tracer is used to analyze latencies in the L2 processing of slot indications.
 
constexpr uint32_t network_gateway_sctp_max_len = 9100
 
constexpr uint32_t network_gateway_udp_max_len = 9100
 
constexpr unsigned GTPU_BASE_HEADER_LEN = 8
 
constexpr unsigned GTPU_EXTENDED_HEADER_LEN = 12
 
constexpr unsigned GTPU_NON_MANDATORY_HEADER_LEN = 4
 
constexpr unsigned GTPU_FLAGS_VERSION_MASK = 0xe0
 
constexpr unsigned GTPU_FLAGS_VERSION_V1 = 0x01
 
constexpr unsigned GTPU_FLAGS_GTP_PRIME_PROTOCOL = 0x00
 
constexpr unsigned GTPU_FLAGS_GTP_PROTOCOL = 0x01
 
constexpr unsigned GTPU_MSG_ECHO_REQUEST = 1
 
constexpr unsigned GTPU_MSG_ECHO_RESPONSE = 2
 
constexpr unsigned GTPU_MSG_ERROR_INDICATION = 26
 
constexpr unsigned GTPU_MSG_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION = 31
 
constexpr unsigned GTPU_MSG_END_MARKER = 254
 
constexpr unsigned GTPU_MSG_DATA_PDU = 255
 
constexpr unsigned GTPU_MAX_NUM_HEADER_EXTENSIONS = 10
 
constexpr unsigned GTPU_MAX_NUM_PRIVATE_EXTENSIONS = 1
 
constexpr unsigned GTPU_PRIVATE_EXTENSION_VALUE_LENGTH = 1
 
constexpr bool RU_TRACE_ENABLED = false
 Set to true for enabling radio unit trace.
 
file_event_tracer< RU_TRACE_ENABLEDru_tracer
 RU event tracing. This tracer is used to analyze latencies in the RU processing.
 
constexpr bool UP_TRACE_ENABLED = false
 
file_event_tracer< UP_TRACE_ENABLED > up_tracer
 
constexpr unsigned FIXED_SIZED_MAC_CE_SUBHEADER_SIZE = 1
 
constexpr unsigned MAC_SDU_SUBHEADER_LENGTH_THRES = 256
 
constexpr unsigned MIN_MAC_SDU_SUBHEADER_SIZE = 2
 
constexpr unsigned MAX_MAC_SDU_SUBHEADER_SIZE = 3
 
constexpr const charMAC_NR_START_STRING = "mac-nr"
 
constexpr uint8_t MAC_NR_PAYLOAD_TAG = 0x01
 
constexpr uint8_t MAC_NR_RNTI_TAG = 0x02
 
constexpr uint8_t MAC_NR_UEID_TAG = 0x03
 
constexpr uint8_t MAC_NR_FRAME_SUBFRAME_TAG = 0x04
 
constexpr uint8_t MAC_NR_PHR_TYPE2_OTHERCELL_TAG = 0x05
 
constexpr uint8_t MAC_NR_HARQID = 0x06
 
constexpr size_t pdcp_sdu_max_size = 9000
 
constexpr size_t pdcp_control_pdu_max_size = 9000
 
constexpr unsigned AVX2_SIZE_BYTE = 32
 Number of bytes in an AVX2 register.
 
constexpr unsigned AVX512_SIZE_BYTE = 64
 Number of bytes in an AVX512 register.
 
constexpr unsigned NEON_SIZE_BYTE = 16
 Number of bytes in a NEON register.
 
constexpr uint8_t PLACEHOLDER_ONE = 255
 UCI placeholder bit.
 
constexpr uint8_t PLACEHOLDER_REPEAT = 254
 UCI placeholder bit.
 
constexpr unsigned MAX_BITS_CRC16 = 3824
 
const unsigned NOF_SSB_SUBCARRIERS = NOF_SSB_PRBS * NOF_SUBCARRIERS_PER_RB
 Number of subcarriers within a SSB block, as per TS 38.211, Section 7.4.3.1.
 
const uint32_t INVALID_RLC_SN = 0xffffffff
 Reserved number representing an invalid RLC sequence number.
 
const uint32_t RETX_COUNT_NOT_STARTED = 0xffffffff
 Reserved number representing that RETX has not started.
 
constexpr uint32_t rlc_am_nr_status_pdu_sizeof_header_ack_sn = 3
 Header fixed part and ACK SN.
 
constexpr uint32_t rlc_am_nr_status_pdu_sizeof_nack_sn_ext_12bit_sn = 2
 NACK SN and extension fields (12 bit SN)
 
constexpr uint32_t rlc_am_nr_status_pdu_sizeof_nack_sn_ext_18bit_sn = 3
 NACK SN and extension fields (18 bit SN)
 
constexpr uint32_t rlc_am_nr_status_pdu_sizeof_nack_so = 4
 NACK segment offsets (start and end)
 
constexpr uint32_t rlc_am_nr_status_pdu_sizeof_nack_range = 1
 NACK range (nof consecutively lost SDUs)
 
constexpr uint32_t RLC_AM_NR_TYP_NACKS = 512
 Expected number of NACKs in status PDU before needing to realloc.
 
constexpr size_t rlc_am_pdu_header_so_size = 2
 
constexpr size_t rlc_am_pdu_header_min_size_12bit = 2
 
constexpr size_t rlc_am_pdu_header_min_size_18bit = 3
 
constexpr size_t rlc_um_pdu_header_size_complete_sdu = 1
 
constexpr size_t rlc_um_pdu_header_size_6bit_sn_no_so = 1
 
constexpr size_t rlc_um_pdu_header_size_12bit_sn_no_so = 2
 
constexpr size_t rlc_um_pdu_header_size_6bit_sn_with_so = 3
 
constexpr size_t rlc_um_pdu_header_size_12bit_sn_with_so = 4
 
template<typename T >
std::enable_if_t< std::is_trivially_copyable< T >::value &&(sizeof(T)<=sizeof(T *)) do_not_optimize )(T const &value)
 This function forbids the compiler from optimizing away expressions without side-effects.
 
constexpr unsigned gtpu_sn_mod = 65536
 
constexpr unsigned gtpu_rx_window_size = 32768
 
constexpr size_t pdcp_data_pdu_header_size_12bit = 2
 
constexpr size_t pdcp_data_pdu_header_size_18bit = 3
 
constexpr size_t pdcp_data_pdu_header_size_max = pdcp_data_pdu_header_size_18bit
 
constexpr size_t pdcp_window_size_12bit = 2048
 
constexpr size_t pdcp_window_size_18bit = 131072
 
Common numerical constants.
constexpr log_likelihood_ratio LLR_MAX = log_likelihood_ratio::max()
 Maximum finite log-likelihood ratio value.
 
constexpr log_likelihood_ratio LLR_MIN = log_likelihood_ratio::min()
 Minimum finite log-likelihood ratio value.
 
constexpr log_likelihood_ratio LLR_INFINITY = log_likelihood_ratio::infinity()
 "Positive infinity" log-likelihood ratio.
 

Detailed Description

This header is currently used only by the MAC to compute extra SSB parameters (needed for scheduling) from those provided by DU.

This factory header file depends on the GTP-U tunnel interfaces (see above include list). It is kept separate as clients of the GTP-U tunnel interfaces do not need to call factory methods.

This factory header file depends on the PDCP entity interfaces (see above include list). It is kept separate as clients of the PDCP entity interfaces dont need to call factory methods.

This factory header file depends on the SDAP interfaces (see above include list). It is kept separate as clients of the SDAP interfaces dont need to call factory methods.

Typedef Documentation

◆ byte_buffer_segment_span_range

Initial value:
detail::byte_buffer_segment_list_span_range_impl<detail::byte_buffer_segment_list::node_t>

Range of byte spans belonging to a byte_buffer_segment_list.

◆ cell_common_configuration_list

List of common configurations for the cells currently added in the scheduler.

Note: Pointers to cell configurations should remain valid on cell removal/addition.

◆ const_byte_buffer_segment_span_range

Initial value:
detail::byte_buffer_segment_list_span_range_impl<const detail::byte_buffer_segment_list::node_t>

◆ csi_aperiodic_trigger_state_list

Used to configure the UE with a list of aperiodic trigger states. Each codepoint of the DCI field "CSI request" is associated with one trigger state.

Remarks
TS 38.331, CSI-AperiodicTriggerStateList.

◆ csi_semi_persistent_on_pusch_trigger_state_list

Initial value:
static_vector<csi_semi_persistent_on_pusch_trigger_state, MAX_NOF_SEMI_PERSISTENT_PUSCH_TRIGGERS>

Used to configure the UE with a list of trigger states for semi-persistent reporting of channel state information on L1.

Remarks
TS 38.331, CSI-SemiPersistentOnPUSCH-TriggerStateList.

◆ described_rx_codeblock

Alias for the full codeblock characterization at the receiver.

  • described_rx_codeblock.first() Contains a view to the LLRs corresponding to one codeblock.
  • described_rx_codeblock.second() Contains the codeblock metadata, useful for processing the corresponding codeblock (e.g., decoding, rate-dematching).

◆ dmrs_symbol_list

Initial value:
static_re_measurement<cf_t,
pusch_constants::MAX_NOF_DMRS_SUBC,
pusch_constants::MAX_NOF_DMRS_SYMBOLS,
pusch_constants::MAX_NOF_LAYERS>

Container for DM-RS symbols.

◆ dmrs_symbol_mask

Data type used to represent a DMRS symbol mask for PDSCH and PUSCH transmissions.

Each bit set in the bitset represents a symbol within the slot. The first bit corresponds to the first symbol.

◆ dummy_ce_payload

Dummy MAC CE payload. To be replaced by other MAC CE payload when its supported.

◆ freq_resource_bitmap

using srsran::freq_resource_bitmap = bounded_bitset<pdcch_constants::MAX_NOF_FREQ_RESOURCES, true>

Describes a frequency resource bitmap for CORESET allocation. Each resource represents a group of 6 PRBs.

Remarks
See TS 38.331, "ControlResourceSet"

◆ gtpu_teid_t

Initial value:
strong_type<uint32_t, struct gtpu_teid_tag, strong_equality, strong_equality_with<uint32_t>, strong_comparison>

◆ is_byte_buffer_range

Initial value:
std::is_same<typename ByteBufferType::iterator, detail::byte_buffer_segment_list_byte_iterator>

Checks whether a type represents a range of byte_buffer_iterators (e.g. byte_buffer, byte_buffer_slice, byte_buffer_view).

◆ nr_cell_id_t

36-bit identifying an NR Cell Id as specified in subclause 9.3.1.7 of 3GPP TS 38.413

Remarks
The leftmost (22-32) bits of the NR Cell Identity correspond to the gNB ID and remaining (4-14) bits for Cell ID.

◆ p_cmax_dbm_range

P_CMAX,f,c value expressed in dBm interval as defined in Table 10.1.18.1-1 of TS 38.133.

Remarks
P_CMAX,f,c is the UE configured maximum output power used in computation of Power Headroom level. See TS 38.321, 6.1.3.8 and TS 38.213, 7.1.1.

◆ ri_restriction_type

CSI Rank Indicator restriction type.

The RI restriction field is described in TS38.331 Section 6.3.2, Information Element CodebookConfig. The bit-width of this field must be equal to the number of CSI-RS transmit number of antennas.

◆ ring_buffer

template<typename T , bool RoundUpSizeToPowerOf2 = true>
using srsran::ring_buffer = detail::ring_buffer_impl<T, std::vector<T>, RoundUpSizeToPowerOf2>

Ring buffer with internal data storage via a std::vector<T>.

  • size can be defined at construction or via set_size.
  • not thread-safe.
    Template Parameters
    Tvalue type stored by buffer
    RoundUpSizeToPowerOf2Whether the ring buffer size gets round up to the next power of 2. When set to true, the compiler is able to avoid the % operation and use instead the "bitwise-and" operation.

◆ sch_mcs_index

Physical Downlink and Uplink Shared Channel Modulation and Code Scheme Index, parameter $fI_{MCS}$f in TS38.214 Section 5.1.3.1.

◆ ssb_to_measure

Configures a pattern of SSBs. See TS 38.331, SSB-ToMeasure. Equates to longBitmap when size of bitset equals to 64. Equates to mediumBitmap when size of bitset equals to 8. Equates to shortBitmap when size of bitset equals to 4.

Remarks
The size of 64 is chosen for bitset in order account for all the bitmap sizes corresponding to longBitmap, mediumBitmap and shortBitmap.

◆ static_ring_buffer

template<typename T , size_t N>
using srsran::static_ring_buffer = detail::ring_buffer_impl<T, std::array<T, N>, false>

Ring buffer with fixed, embedded data storage via a std::array<T, N>. It can contain up to N elements.

  • Given that the buffer size is known at compile-time, the circular iteration over the buffer may be more optimized (e.g. when N is a power of 2, % operator can be avoided).
  • not thread-safe.
    Template Parameters
    Tvalue type stored by buffer.
    NMaximum capacity of the ring buffer.

◆ validator_result

This type represents the result of a validator function. In case of failure, it contains a string describing the error. In case of success, the .has_value() method returns true.

Enumeration Type Documentation

◆ activity_notification_level_t

enum class srsran::activity_notification_level_t : uint8_t
strong
223: uint8_t { ue = 0, pdu_session = 1, drb = 2, invalid = 3 };
Definition ue.h:47

◆ aggregation_level

Aggregation Level of PDCCH allocation.

31: uint8_t { n1 = 0, n2, n4, n8, n16 };

◆ alloc_outcome

Outcome of a UE grant allocation, and action for the scheduler policy to follow afterwards.

The current outcomes are:

  • success - the allocation was successful with the provided parameters.
  • skip_slot - failure to allocate and the scheduler policy should terminate the current slot processing.
  • skip_ue - failure to allocate and the scheduler policy should move on to the next candidate UE.
  • invalid_params - failure to allocate and the scheduler policy should try a different set of grant parameters.
67{ success, skip_slot, skip_ue, invalid_params };

◆ alpha

The IE Alpha defines possible values of a the pathloss compensation coefficient for uplink power control. Value alpha0 corresponds to the value 0, Value alpha04 corresponds to the value 0.4, and so on. Value alpha1 corresponds to value 1.

Remarks
See TS 38.331, Alpha. Also, see clause 7.1 of TS 38.213.
31: unsigned { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, not_set };

◆ alpha_scaling_opt

scaling values options, part of UCI-OnPUSCH, part of PUSCH-Config, as per TS 38.331.

33{ f0p5, f0p65, f0p8, f1 };

◆ bs_channel_bandwidth_fr1

Labels for the BS Channel Bandwidth for FR1, described in TS38.104, Table 5.3.2-1.

30 {
31 invalid = 0,
32 MHz5 = 5,
33 MHz10 = 10,
34 MHz15 = 15,
35 MHz20 = 20,
36 MHz25 = 25,
37 MHz30 = 30,
38 MHz35 = 35,
39 MHz40 = 40,
40 MHz45 = 45,
41 MHz50 = 50,
42 MHz60 = 60,
43 MHz70 = 70,
44 MHz80 = 80,
45 MHz90 = 90,
46 MHz100 = 100,
47};

◆ bsr_format

TS 38.321, 6.1.3.1 - Buffer Status Report MAC CEs.

36{ SHORT_BSR, LONG_BSR, SHORT_TRUNC_BSR, LONG_TRUNC_BSR };

◆ bucket_size_duration

Bucket size duration in milliseconds. See TS 38.331, bucketSizeDuration.

93 {
94 ms5 = 5,
95 ms10 = 10,
96 ms20 = 20,
97 ms50 = 50,
98 ms100 = 100,
99 ms150 = 150,
100 ms300 = 300,
101 ms500 = 500,
102 ms1000 = 1000,
103 spare7 = 1007,
104 spare6 = 1006,
105 spare5 = 1005,
106 spare4 = 1004,
107 spare3 = 1003,
108 spare2 = 1002,
109 spare1 = 1001,
110};

◆ bwp_id_t

BWP-Id used to identify a BWP from the perspective of a UE.

Remarks
See TS 38.331, "BWP-Id" and "maxNrofBWPs".
61: uint8_t { MIN_BWP_ID = 0, MAX_BWP_ID = 3, MAX_NOF_BWPS = 4 };

◆ cause_misc_t

enum class srsran::cause_misc_t : uint8_t
strong
91 : uint8_t {
92 ctrl_processing_overload = 0,
93 not_enough_user_plane_processing_res,
94 hardware_fail,
95 om_intervention,
96 unknown_plmn_or_sn_pn,
97 unspecified
98};

◆ cause_nas_t

enum class srsran::cause_nas_t : uint8_t
strong
79: uint8_t { normal_release = 0, authentication_fail, deregister, unspecified };

◆ cause_protocol_t

enum class srsran::cause_protocol_t : uint8_t
strong
81 : uint8_t {
82 transfer_syntax_error = 0,
83 abstract_syntax_error_reject,
84 abstract_syntax_error_ignore_and_notify,
85 msg_not_compatible_with_receiver_state,
86 semantic_error,
87 abstract_syntax_error_falsely_constructed_msg,
88 unspecified
89};

◆ cause_radio_network_t

enum class srsran::cause_radio_network_t : uint8_t
strong
29 : uint8_t {
30 unspecified = 0,
31 txnrelocoverall_expiry,
32 successful_ho,
33 release_due_to_ngran_generated_reason,
34 release_due_to_5gc_generated_reason,
35 ho_cancelled,
36 partial_ho,
37 ho_fail_in_target_5_gc_ngran_node_or_target_sys,
38 ho_target_not_allowed,
39 tngrelocoverall_expiry,
40 tngrelocprep_expiry,
41 cell_not_available,
42 unknown_target_id,
43 no_radio_res_available_in_target_cell,
44 unknown_local_ue_ngap_id,
45 inconsistent_remote_ue_ngap_id,
46 ho_desirable_for_radio_reason,
47 time_crit_ho,
48 res_optim_ho,
49 reduce_load_in_serving_cell,
50 user_inactivity,
51 radio_conn_with_ue_lost,
52 radio_res_not_available,
53 invalid_qos_combination,
54 fail_in_radio_interface_proc,
55 interaction_with_other_proc,
56 unknown_pdu_session_id,
57 unkown_qos_flow_id,
58 multiple_pdu_session_id_instances,
59 multiple_qos_flow_id_instances,
60 encryption_and_or_integrity_protection_algorithms_not_supported,
61 ng_intra_sys_ho_triggered,
62 ng_inter_sys_ho_triggered,
63 xn_ho_triggered,
64 not_supported_5qi_value,
65 ue_context_transfer,
66 ims_voice_eps_fallback_or_rat_fallback_triggered,
67 up_integrity_protection_not_possible,
68 up_confidentiality_protection_not_possible,
69 slice_not_supported,
70 ue_in_rrc_inactive_state_not_reachable,
71 redirection,
72 res_not_available_for_the_slice,
73 ue_max_integrity_protected_data_rate_reason,
74 release_due_to_cn_detected_mob
75};

◆ cause_transport_t

enum class srsran::cause_transport_t : uint8_t
strong
77: uint8_t { transport_res_unavailable = 0, unspecified };

◆ concurrent_queue_policy

Types of concurrent queues. They differ in type of synchronization mechanism and number of producers/consumers supported. Supported types are:

  • lockfree_spsc: lockfree single producer single consumer queue (SPSC).
  • lockfree_mpmc: lockfree multiple producer multiple consumer queue (MPMC).
  • locking_mpmc: multiple producer multiple consumer (MPMC) queue that uses a mutex for synchronization. It is the most generic type of queue, but it is also the slowest. It relies on a condition variable to wake up producers and consumers.
  • locking_mpsc: similar to the locking_mpmc, but it leverages batch popping on the consumer side, to reduce mutex contention.
45{ lockfree_spsc, lockfree_mpmc, locking_mpmc, locking_mpsc };

◆ concurrent_queue_wait_policy

Types of barriers used for blocking pushes/pops of elements. Three types:

  • condition_variable: uses a condition variable to wake up producers and consumers.
  • sleep: spins on a sleep if the queue is full, in case of blocking push, and if the queue is empty in case of blocking pop.
  • non_blocking: no blocking mechanism is exposed.
52{ condition_variable, sleep, non_blocking };

◆ confidentiality_protection_indication_t

enum class srsran::confidentiality_protection_indication_t
strong
185{ required, preferred, not_needed };

◆ confidentiality_protection_result_t

enum class srsran::confidentiality_protection_result_t
strong
160{ performed, not_performed };

◆ coreset_id

CORESET identifier. This value is UE-specific, which means that a UE can have up to "maxNrofControlResourceSets" CORESETS configured.

Remarks
See TS 38.331, "maxNrofControlResourceSets".
43: uint8_t { MAX_CORESET_ID = 11, MAX_NOF_CORESETS = 12 };

◆ cpu_feature

CPU feature list.

32 {
33#ifdef __x86_64__
35 avx,
37 avx2,
39 avx512f,
41 avx512bw,
43 avx512vl,
45 avx512dq,
47 avx512cd,
49 pclmul,
51 sse4_1,
53 fma,
54#endif // __x86_64__
55#ifdef __aarch64__
59 neon,
60#endif // __aarch64__
61};

◆ cqi_table_t

CQI table to use for CQI calculation.

Remarks
See TS 38.331, cqi-Table in CSI-ReportConfig and TS 38.214, clause 5.2.2.1.
Value table4 is for Rel.16 or above only.
67{ table1, table2, table3, table4 };

◆ crc_generator_poly

CRC cyclic generator polynomials identifiers.

31 {
32 CRC24A,
33 CRC24B,
34 CRC24C,
35 CRC16,
36 CRC11,
37 CRC6,
38 // etc...
39};

◆ csi_im_res_id_t

CSI-IM-ResourceId is used to identify one CSI-IM-Resource.

Remarks
See TS 38.331, CSI-IM-ResourceId.
48 : uint8_t {
49 MIN_CSI_IM_RESOURCE_ID = 0,
50 MAX_CSI_IM_RESOURCE_ID = 31,
51 MAX_NOF_CSI_IM_RESOURCES = 32
52};

◆ csi_im_res_set_id_t

CSI-IM-ResourceSetId is used to identify CSI-IM-ResourceSets.

Remarks
See TS 38.331, CSI-IM-ResourceSetId.
56 : uint8_t {
57 MIN_CSI_IM_RESOURCE_SET_ID = 0,
58 MAX_CSI_IM_RESOURCE_SET_ID = 63,
59 MAX_NOF_CSI_IM_RESOURCE_SETS = 64,
60 MAX_NOF_CSI_IM_RESOURCES_PER_SET = 8,
61};

◆ csi_report_config_id_t

CSI-ReportConfigId is used to identify one CSI-ReportConfig.

Remarks
See TS 38.331, CSI-ReportConfigId.
38 : uint8_t {
39 MIN_CSI_REPORT_CONFIG_ID = 0,
40 MAX_CSI_REPORT_CONFIG_ID = 47,
41 MAX_NOF_CSI_REPORT_CONFIGS = 48,
42};

◆ csi_report_periodicity

Periodicity and slot offset.

Remarks
See TS 38.331, CSI-ReportPeriodicityAndOffset.
46 {
47 slots4 = 4,
48 slots5 = 5,
49 slots8 = 8,
50 slots10 = 10,
51 slots16 = 16,
52 slots20 = 20,
53 slots40 = 40,
54 slots80 = 80,
55 slots160 = 160,
56 slots320 = 320
57};

◆ csi_report_quantities

CSI report quantities.

Described in TS38.331 Section 6.3.2, Information Element CSI-ReportConfig.

Enumerator
cri_ri_pmi_cqi 

CSI report contains the quantities CRI, RI, PMI and wideband CQI.

cri_ri_cqi 

CSI report contains the quantities CRI, RI and wideband CQI.

cri_ri_li_pmi_cqi 

CSI report contains the quantities CRI, RI, LI, PMI and wideband CQI.

other 

Other CSI report quantity configuration. Not supported.

49 {
57 other
58};
@ cri_ri_li_pmi_cqi
CSI report contains the quantities CRI, RI, LI, PMI and wideband CQI.
@ cri_ri_cqi
CSI report contains the quantities CRI, RI and wideband CQI.
@ cri_ri_pmi_cqi
CSI report contains the quantities CRI, RI, PMI and wideband CQI.

◆ csi_res_config_id_t

CSI-ResourceConfigId is used to identify a CSI-ResourceConfig.

Remarks
See TS 38.331, CSI-ResourceConfigId.
35 : uint8_t {
36 MIN_CSI_RESOURCE_CONFIG_ID = 0,
37 MAX_CSI_RESOURCE_CONFIG_ID = 111,
38 MAX_NOF_CSI_RESOURCE_CONFIGS = 112,
39};

◆ csi_resource_periodicity

Used to configure a periodicity for periodic and semi-persistent CSI resources, and for periodic and semi-persistent reporting on PUCCH.

Remarks
See TS 38.331, CSI-ResourcePeriodicityAndOffset.
75 {
76 slots4 = 4,
77 slots5 = 5,
78 slots8 = 8,
79 slots10 = 10,
80 slots16 = 16,
81 slots20 = 20,
82 slots32 = 32,
83 slots40 = 40,
84 slots64 = 64,
85 slots80 = 80,
86 slots160 = 160,
87 slots320 = 320,
88 slots640 = 640
89};

◆ csi_rs_cdm_type

Code-Division Multiplexing (CDM) strategies for CSI-RS.

Enumerator
no_CDM 

No CDM, i.e. CDM group of size 1.

fd_CDM2 

Frequency-domain CDM group of size 2.

cdm4_FD2_TD2 

CDM group of size 4 (two frequency-domain locations and two time-domain locations).

cdm8_FD2_TD4 

CDM group of size 8 (two frequency-domain locations and four time-domain locations).

41 {
43 no_CDM = 0,
45 fd_CDM2,
50};
@ cdm4_FD2_TD2
CDM group of size 4 (two frequency-domain locations and two time-domain locations).
@ fd_CDM2
Frequency-domain CDM group of size 2.
@ cdm8_FD2_TD4
CDM group of size 8 (two frequency-domain locations and four time-domain locations).
@ no_CDM
No CDM, i.e. CDM group of size 1.

◆ csi_rs_freq_density_type

Strategies regarding Resource Element (RE) density in the frequency domain for CSI-RS signals.

Enumerator
dot5_even_RB 

One RE occupied in even-numbered PRB.

dot5_odd_RB 

One RE occupied in odd-numbered PRB.

one 

One RE occupied in every PRB.

three 

Three RE occupied in every PRB.

69 {
71 dot5_even_RB = 0,
75 one,
77 three
78};
@ dot5_odd_RB
One RE occupied in odd-numbered PRB.
@ dot5_even_RB
One RE occupied in even-numbered PRB.

◆ csi_rs_type

CSI-RS types.

Enumerator
TRS 

Tracking Reference signals.

CSI_RS_NZP 

Non-Zero-Power CSI Reference Signal.

CSI_RS_ZP 

Zero-Power CSI Reference Signal.

31 : uint8_t {
33 TRS,
38};
@ TRS
Tracking Reference signals.
@ CSI_RS_NZP
Non-Zero-Power CSI Reference Signal.
@ CSI_RS_ZP
Zero-Power CSI Reference Signal.

◆ csi_ssb_res_set_id_t

CSI-SSB-ResourceSetId is used to identify one SS/PBCH block resource set.

Remarks
See TS 38.331, CSI-SSB-ResourceSetId.
65 {
66 MIN_CSI_SSB_RESOURCE_SET_ID = 0,
67 MAX_CSI_SSB_RESOURCE_SET_ID = 63,
68 MAX_NOF_CSI_SSB_RESOURCE_SETS = 64,
69 MAX_NOF_CSI_SSB_RESOURCES_PER_SET = 64,
70};

◆ cu_up_cn_support_t

enum class srsran::cu_up_cn_support_t
strong
31{ c_epc = 0, c_5gc, both };

◆ dc_offset_t

Direct Current (DC) offset, in number of subcarriers. See "txDirectCurrentLocation" in TS 38.331.

The numerology of the active UL/DL BWP is used as a reference to determine the number of subcarriers of the DC offset. The DC offset value 0 corresponds to the center of the SCS-Carrier for the numerology of the active UL/DL BWP. The relation with the TS 38.331 "txDirectCurrentLocation" parameter is, therefore, given by: dc_offset = txDirectCurrentLocation - 12 * N_RB / 2, where "N_RB" is the number of RBs of the SCS-Carrier. In case the DC offset falls within the SCS-Carrier boundaries, its value should range between {0,...,12 * N_RB - 1}.

39 : int {
40 min = -static_cast<int>(NOF_SUBCARRIERS_PER_RB * MAX_NOF_PRBS) / 2,
41 center = 0,
42 max = static_cast<int>(NOF_SUBCARRIERS_PER_RB * MAX_NOF_PRBS) / 2 - 1,
43 outside = static_cast<int>(NOF_SUBCARRIERS_PER_RB * MAX_NOF_PRBS) / 2,
44 undetermined = std::numeric_limits<int>::max()
45};
constexpr std::size_t NOF_SUBCARRIERS_PER_RB
See TS 38.211, 4.4.4.1 - Resource Blocks, General.
Definition resource_block.h:35
slot_point min(slot_point lhs, slot_point rhs)
Get minimum of two slot points.
Definition slot_point.h:272
constexpr std::size_t MAX_NOF_PRBS
Definition resource_block.h:32

◆ dci_dl_format

enum class srsran::dci_dl_format
strong
41{ f1_0, f1_1, f2_0 };

◆ dci_dl_rnti_config_type

Defines which fields are stored in the DCI payload, based on the chosen DCI format and RNTI type.

45{ si_f1_0, ra_f1_0, c_rnti_f1_0, tc_rnti_f1_0, p_rnti_f1_0, c_rnti_f1_1 };

◆ dci_ul_format

enum class srsran::dci_ul_format
strong
42{ f0_0, f0_1 };

◆ dci_ul_rnti_config_type

Defines which fields are stored in the DCI payload, based on the chosen DCI format and RNTI type.

84{ tc_rnti_f0_0, c_rnti_f0_0, c_rnti_f0_1 };

◆ dmrs_additional_positions

Position for additional DM-RS in DL (see TS 38.211, Tables 7.4.1.1.2-3 and 7.4.1.1.2-4).

Remarks
See TS 38.331, DMRS-DownlinkConfig and DMRS-UplinkConfig.
42{ pos0 = 0, pos1, pos2, pos3 };

◆ dmrs_config_type

Type of DMRS to be used in DL and UL.

Remarks
See TS 38.331, DMRS-DownlinkConfig and DMRS-UplinkConfig.
38{ type1 = 1, type2, not_set };

◆ dmrs_max_length

The maximum number of OFDM symbols for DL front loaded DMRS. If set to len2, the UE determines the actual number of DM-RS symbols by the associated DCI. (see TS 38.214, clause 7.4.1.1.2).

Remarks
See TS 38.214, DMRS-DownlinkConfig.
52{ len1 = 1, len2, not_set };

◆ dmrs_typeA_position

Position of first DM-RS for Downlink (see TS 38.211, clause 7.4.1.1.1) and Uplink (see TS 38.211, clause 6.4.1.1.3).

29{ pos2 = 2, pos3 = 3 };

◆ drb_id_t

enum class srsran::drb_id_t : uint8_t
strong
93 : uint8_t {
94 drb1 = 1,
95 drb2,
96 drb3,
97 drb4,
98 drb5,
99 drb6,
100 drb7,
101 drb8,
102 drb9,
103 drb10,
104 drb11,
105 drb12,
106 drb13,
107 drb14,
108 drb15,
109 drb16,
110 drb17,
111 drb18,
112 drb19,
113 drb20,
114 drb21,
115 drb22,
116 drb23,
117 drb24,
118 drb25,
119 drb26,
120 drb27,
121 drb28,
122 drb29,
123 invalid
124};

◆ du_cell_group_index_t

DU-specific index to group of cells that might be aggregated into a UE-specific CellGroup, if the UE is CA-capable.

79 : uint16_t {
80 MAX_DU_CELL_GROUPS = du_cell_index_t::MAX_NOF_DU_CELLS,
81 INVALID_DU_CELL_GROUP_INDEX = MAX_DU_CELL_GROUPS
82};

◆ du_cell_index_t

Maximum number of cells supported by DU (implementation-defined).

40 : uint16_t {
41 MIN_DU_CELL_INDEX = 0,
42 MAX_DU_CELL_INDEX = 15,
43 MAX_NOF_DU_CELLS = 16,
44 INVALID_DU_CELL_INDEX = MAX_NOF_DU_CELLS
45};

◆ du_ue_index_t

Maximum number of UEs supported by DU (implementation-defined).

32 : uint16_t {
33 MIN_DU_UE_INDEX = 0,
34 MAX_DU_UE_INDEX = 1023,
35 MAX_NOF_DU_UES = 1024,
36 INVALID_DU_UE_INDEX = 1024
37};

◆ duplex_mode

NR Duplex mode.

Enumerator
FDD 

Paired FDD.

TDD 

Unpaired TDD.

SDL 

Supplementary DownLink (Unpaired).

SUL 

Supplementary UpLink (Unpaired).

30 {
32 FDD = 0,
34 TDD,
36 SDL,
38 SUL,
39 INVALID
40};
@ TDD
Unpaired TDD.
@ SDL
Supplementary DownLink (Unpaired).
@ SUL
Supplementary UpLink (Unpaired).
@ FDD
Paired FDD.

◆ dynamic_resource_allocation

Dynamic resource allocation indicator for DCI formats 0_1 and 1_1.

43{ type_0, type_1 };

◆ e2sm_kpm_collection_method_t

enum srsran::e2sm_kpm_collection_method_t
32 {
33 CC = 1, // Cumulative Counter
34 GAUGE = 2, // Dynamic Variable
35 DER = 3, // Discrete Event Registration (n=1)
36 SI = 4, // Status Inspection
37 OM = 5 // ?
38};

◆ e2sm_kpm_label_enum

enum srsran::e2sm_kpm_label_enum
41 {
42 NO_LABEL = 0x00000001, // if included, other labels shall not be included (and vice versa)
43 PLMN_ID_LABEL = 0x00000002,
44 SLICE_ID_LABEL = 0x00000004,
45 FIVE_QI_LABEL = 0x00000008,
46 QFI_LABEL = 0x00000010,
47 QCI_LABEL = 0x00000020,
48 QCI_MAX_LABEL = 0x00000040,
49 QCI_MIN_LABEL = 0x00000080,
50 ARP_MAX_LABEL = 0x00000100,
51 ARP_MIN_LABEL = 0x00000200,
52 BITRATE_RANGE_LABEL = 0x00000400,
53 LAYER_MU_MIMO_LABEL = 0x00000800,
54 SUM_LABEL = 0x00001000,
55 DIST_BIN_X_LABEL = 0x00002000,
56 DIST_BIN_Y_LABEL = 0x00004000,
57 DIST_BIN_Z_LABEL = 0x00008000,
58 PRE_LABEL_OVERRIDE_LABEL = 0x00010000,
59 START_END_IND_LABEL = 0x00020000,
60 MIN_LABEL = 0x00040000,
61 MAX_LABEL = 0x00080000,
62 AVG_LABEL = 0x00100000,
63 SSB_IDX_LABEL = 0x00200000,
64 NON_GO_B_BFMODE_IDX_LABEL = 0x00400000,
65 MIMO_MODE_IDX_LABEL = 0x00800000,
66 ALL_VALUE_TYPE_LABELS = 0x001c1000, // SUM | MIN | MAX | AVG
67 ALL_SUBCOUNTER_LABELS = 0x00e3effe,
68 ALL_LABELS = 0x00ffffff,
69 UNKNOWN_LABEL = 0x10000000
70};

◆ e2sm_kpm_measurement_object_t

enum srsran::e2sm_kpm_measurement_object_t
40 {
41 E2_Node = 0x0001, // ManagedElement
42 GNBCUUP = 0x0002, // GNBCUUPFunction
43 NRCellCU = 0x0004,
44 NRCellDU = 0x0008,
45 NRCellRelation = 0x0010,
46 EutranRelation = 0x0020,
47 BEAM = 0x0040,
48 EP_F1U = 0x0080,
49 EP_XnU = 0x0100,
50 EP_X2U = 0x0200,
51 ANY = 0xffff
52};

◆ e2sm_kpm_metric_dtype_t

enum srsran::e2sm_kpm_metric_dtype_t
54{ INTEGER, REAL };

◆ e2sm_kpm_metric_level_enum

enum srsran::e2sm_kpm_metric_level_enum
32 {
33 E2_NODE_LEVEL = 0x01,
34 UE_LEVEL = 0x02,
35 QOS_FLOW_LEVEL = 0x04,
36 ALL_LEVELS = 0x07,
37 UNKNOWN_LEVEL = 0x10
38};

◆ e2sm_service_model_t

enum srsran::e2sm_service_model_t
35{ KPM, RC, UNKNOWN_SM };

◆ enqueue_priority

Queue priority used to map to specific queue of the priority_multiqueue_task_worker. The higher the priority, the lower its integer value representation.

734: size_t { min = 0, max = std::numeric_limits<size_t>::max() };
slot_point max(slot_point lhs, slot_point rhs)
Get maximum of two slot points.
Definition slot_point.h:266

◆ establishment_cause_t

enum class srsran::establishment_cause_t : uint8_t
strong
104 : uint8_t {
105 emergency = 0,
106 high_prio_access,
107 mt_access,
108 mo_sig,
109 mo_data,
110 mo_voice_call,
111 mo_video_call,
112 mo_sms,
113 mps_prio_access,
114 mcs_prio_access
115};

◆ fftw_plan_optimization

FFTW optimization flags.

FFTW planning rigor flags, arranged from fastest to slowest in terms of plan creation time, and from least to most optimized FFT algorithm selection.

Enumerator
fftw_estimate 

Picks a sub-optimal plan quickly, using heuristics.

fftw_measure 

Finds an optimized FFT plan by computing several FFTs and measuring their execution time.

fftw_exhaustive 

Same as fftw_measure but more exhaustive.

38 : unsigned {
40 fftw_estimate = FFTW_ESTIMATE,
42 fftw_measure = FFTW_MEASURE,
44 fftw_exhaustive = FFTW_EXHAUSTIVE
45};
@ fftw_measure
Finds an optimized FFT plan by computing several FFTs and measuring their execution time.
@ fftw_estimate
Picks a sub-optimal plan quickly, using heuristics.
@ fftw_exhaustive
Same as fftw_measure but more exhaustive.

◆ five_qi_t

enum class srsran::five_qi_t : uint16_t
strong

Five QI.

34: uint16_t { min = 0, max = MAX_FIVEQI, invalid = MAX_FIVEQI + 1 };

◆ frequency_range

Labels for the frequency ranges described in TS38.104 Table 5.1-1.

Enumerator
FR1 

Frequency range 1, from 410 to 7125 MHz.

FR2 

Frequency range 2, from 24250 to 52600 MHz.

30 {
32 FR1 = 0,
34 FR2
35};
@ FR1
Frequency range 1, from 410 to 7125 MHz.
@ FR2
Frequency range 2, from 24250 to 52600 MHz.

◆ gnb_cu_cp_ue_e1ap_id_t

enum class srsran::gnb_cu_cp_ue_e1ap_id_t : uint64_t
strong
43: uint64_t { min = 0, max = MAX_NOF_CU_CP_E1AP_UES - 1, invalid = 0x1ffffffff };

◆ gnb_cu_ue_f1ap_id_t

enum class srsran::gnb_cu_ue_f1ap_id_t : uint64_t
strong
34: uint64_t { min = 0, max = MAX_NOF_CU_F1AP_UES - 1, invalid = 0x1ffffffff };

◆ gnb_cu_up_ue_e1ap_id_t

enum class srsran::gnb_cu_up_ue_e1ap_id_t : uint64_t
strong
59: uint64_t { min = 0, max = MAX_NOF_CU_CP_E1AP_UES - 1, invalid = 0x1ffffffff };

◆ gnb_du_id_t

enum class srsran::gnb_du_id_t : uint64_t
strong

Global NodeB DU ID as per TS 38.473.

30: uint64_t { min = 0, max = 68719476735, invalid = max + 1 };

◆ gnb_du_ue_f1ap_id_t

enum class srsran::gnb_du_ue_f1ap_id_t : uint64_t
strong
50: uint64_t { min = 0, max = MAX_NOF_DU_F1AP_UES - 1, invalid = 0x1ffffffff };

◆ gnb_sched_affinity_mask_policy

Thread pinning policy to a CPU affinity mask in the gNB.

Enumerator
round_robin 

Each thread is pinned to a single CPU in a mask in RR fashion.

mask 

All threads are sharing the same affinity mask.

33 {
35 round_robin = 0,
37 mask = 1,
38 last
39};
@ round_robin
Each thread is pinned to a single CPU in a mask in RR fashion.
@ mask
All threads are sharing the same affinity mask.

◆ gnb_sched_affinity_mask_types

Types of CPU affinity masks in the gNB.

30{ l1_dl, l1_ul, l2_cell, ru, low_priority, last };

◆ gtpu_comprehension

enum class srsran::gtpu_comprehension : uint8_t
strong
131 : uint8_t {
132 not_required_intermediate_node_forward = 0b00000000,
133 not_required_intermediate_node_discard = 0b00000001,
134 required_at_endpoint_not_intermediate_node = 0b00000010,
135 required_at_endpoint_and_intermediate_node = 0b00000011
136};

◆ gtpu_extension_header_type

enum class srsran::gtpu_extension_header_type : uint8_t
strong
74 : uint8_t {
75 no_more_extension_headers = 0b00000000,
76 reserved_0 = 0b00000001,
77 reserved_1 = 0b00000010,
78 long_pdcp_pdu_number_0 = 0b00000011,
79 service_class_indicator = 0b00100000,
80 udp_port = 0b01000000,
81 ran_container = 0b10000001,
82 long_pdcp_pdu_number_1 = 0b10000010,
83 xw_ran_container = 0b10000011,
84 nr_ran_container = 0b10000100,
85 pdu_session_container = 0b10000101,
86 pdcp_pdu_number = 0b11000000,
87 reserved_2 = 0b11000001,
88 reserved_3 = 0b11000010
89};

◆ gtpu_information_element_type

enum class srsran::gtpu_information_element_type : uint8_t
strong
139 : uint8_t {
140 recovery = 14,
141 tunnel_endpoint_identifier_data_i = 16,
142 gsn_address = 133,
143 extension_header_type_list = 141,
144 private_extension = 255
145};

◆ harq_id_t

Identification of an HARQ process.

28: uint8_t { MAX_HARQ_ID = 15, MAX_NOF_HARQS = 16, INVALID_HARQ_ID = 16 };

◆ integrity_protection_indication_t

enum class srsran::integrity_protection_indication_t
strong
167{ required, preferred, not_needed };

◆ integrity_protection_result_t

enum class srsran::integrity_protection_result_t
strong
159{ performed, not_performed };

◆ io_broker_type

enum class srsran::io_broker_type
strong
30{ epoll, io_uring };

◆ lcg_id_t

Logical Channel Group as per TS38.331.

31: uint8_t { MAX_LCG_ID = 7, MAX_NOF_LCGS = 8, LCG_ID_INVALID = 8 };

◆ lcid_t

enum srsran::lcid_t : uint16_t

Logical Channel Identity used to associate one logical channel to the corresponding RLC bearer. Values (0..32)

32 : uint16_t {
33 LCID_SRB0 = 0,
34 LCID_SRB1 = 1,
35 LCID_SRB2 = 2,
36 LCID_SRB3 = 3,
37 LCID_MIN_DRB = 4,
38 LCID_MAX_DRB = 32,
39 MAX_NOF_RB_LCIDS = 33,
40 INVALID_LCID = 64
41};

◆ ldpc_base_graph_type

LDPC Base graph types.

31: uint8_t { BG1 = 1, BG2 = 2 };

◆ logical_channel_sr_delay_timer

logicalChannelSR-DelayTimer, as part of BSR-Config, TS 38.331.

165 {
166 sf20 = 20,
167 sf40 = 40,
168 sf64 = 64,
169 sf128 = 128,
170 sf512 = 512,
171 sf1024 = 1024,
172 sf2560 = 2560
173};

◆ lower_phy_baseband_buffer_size_policy

Lower physical layer baseband gateway buffer size policy.

Determines the policy to select the baseband gateway buffer size.

Enumerator
slot 

The buffer size matches the number of samples per slot.

half_slot 

The buffer size matches the number of samples per half-slot.

single_packet 

The buffer size if equal to baseband_gateway::get_transmitter_optimal_buffer_size for the transmitter and baseband_gateway::get_receiver_optimal_buffer_size for the receiver.

optimal_slot 

The buffer size is is equal to the greatest multiple of baseband_gateway::get_transmitter_optimal_buffer_size for the transmitter and baseband_gateway::get_receiver_optimal_buffer_size for the receiver less than the number of samples per slot.

58 : unsigned {
60 slot = 0,
70};
@ slot
The buffer size matches the number of samples per slot.
@ half_slot
The buffer size matches the number of samples per half-slot.

◆ lower_phy_thread_profile

Lower physical layer thread profiles.

Enumerator
blocking 

Same task worker as the rest of the PHY (ZMQ only).

single 

Single task worker for all the lower physical layer task executors.

dual 

Two task workers - one for the downlink and one for the uplink.

quad 

Dedicated task workers for each of the subtasks (downlink processing, uplink processing, reception and transmission).

835 {
837 blocking = 0,
839 single,
841 dual,
844 quad
845};
@ blocking
Same task worker as the rest of the PHY (ZMQ only).
@ dual
Two task workers - one for the downlink and one for the uplink.
@ single
Single task worker for all the lower physical layer task executors.

◆ mac_harq_ack_report_status

Outcomes of a HARQ-ACK report.

36{ nack = 0, ack, dtx };

◆ mac_pcap_type

enum class srsran::mac_pcap_type
strong
70{ udp, dlt };

◆ max_pucch_code_rate

Options for PUCCH-MaxCodeRate in PUCCH-Config, TS 38.331.

58{ not_set = 0, dot_08, dot_15, dot_25, dot_35, dot_45, dot_60, dot_80 };

◆ min_channel_bandwidth

Labels for the Minimum Channel Bandwidth for FR1< >. This is not explicitly defined in the TS, but it is used by TS 38.213, Section 13 for the Coreset 0 configuration. As per TS 38.104, Table 5.3.5-1, there are three possible minimum BW: 5MHz, 10MHz, 20MHz, and 40MHz.

64{ MHz5 = 0, MHz10, MHz20, MHz40, invalid };

◆ modulation_scheme

Modulation schemes as described in TS38.211 Section 5.1.

Each modulation identifier is mapped to the corresponding modulation order.

Enumerator
PI_2_BPSK 

90-degree shifting Binary Phase Shift Keying (π/2-BPSK) described in TS38.211 Section 5.1.1.

BPSK 

Binary Phase Shift Keying (BPSK) modulation described in TS38.211 Section 5.1.2.

QPSK 

Quadrature Phase Shift Keying (QPSK) modulation described in TS38.211 Section 5.1.3.

QAM16 

16-point Quadrature Amplitude Modulation (16-QAM) described in TS38.211 Section 5.1.4.

QAM64 

64-point Quadrature Amplitude Modulation (64-QAM) described in TS38.211 Section 5.1.5.

QAM256 

256-point Quadrature Amplitude Modulation (256-QAM) described in TS38.211 Section 5.1.6.

39 {
41 PI_2_BPSK = 0,
43 BPSK = 1,
45 QPSK = 2,
47 QAM16 = 4,
49 QAM64 = 6,
51 QAM256 = MODULATION_MAX_BITS_PER_SYMBOL
52};
@ QAM16
16-point Quadrature Amplitude Modulation (16-QAM) described in TS38.211 Section 5....
@ QAM64
64-point Quadrature Amplitude Modulation (64-QAM) described in TS38.211 Section 5....
@ PI_2_BPSK
90-degree shifting Binary Phase Shift Keying (π/2-BPSK) described in TS38.211 Section 5....
@ QAM256
256-point Quadrature Amplitude Modulation (256-QAM) described in TS38.211 Section 5....
@ BPSK
Binary Phase Shift Keying (BPSK) modulation described in TS38.211 Section 5.1.2.

◆ n_ta_offset

Time advance offset - parameter $N_{TA,offset}$ in TS38.211 Section 4.3.3.

This value must be selected from the parameter n-TimingAdvanceOffset (TS38.331 Section 6.3.2, Information Element ServingCellConfigCommon) if it is present. Otherwise, it is given by TS38.133 Section 7.1.2 depending on the duplex mode of the cell and the frequency range.

The values are given in units of $T_c$ (see TS38.211 Section 4.1).

Enumerator
n0 

For FR1 FDD band with LTE-NR coexistence case.

n25600 

For FR1 FDD band without LTE-NR coexistence case or for FR1 TDD band without LTE-NR coexistence case.

n13792 

For FR2.

n39936 

For FR1 TDD band with LTE-NR coexistence case.

34 {
36 n0 = 0,
38 n25600 = 25600,
40 n13792 = 13792,
42 n39936 = 39936
43};
@ n25600
For FR1 FDD band without LTE-NR coexistence case or for FR1 TDD band without LTE-NR coexistence case.
@ n39936
For FR1 TDD band with LTE-NR coexistence case.
@ n0
For FR1 FDD band with LTE-NR coexistence case.

◆ nof_cyclic_shifts

Options for the number of Initial Cyclic Shifts that can be set for PUCCH Format 1.

Defines the number of different Initial Cyclic Shifts that can be used for PUCCH Format 1, as per PUCCH-format1, in PUCCH-Config, TS 38.331. We assume the CS are evenly distributed, which means we can only have a divisor of 12 possible cyclic shifts.

43{ no_cyclic_shift = 1, two = 2, three = 3, four = 4, six = 6, twelve = 12 };

◆ nominal_rbg_size

Nominal RBG-size (P value).

Remarks
See TS 38.214, Sections 5.1.2.2 and 6.1.2.2.
40: unsigned { P2 = 2, P4 = 4, P8 = 8, P16 = 16 };

◆ nr_band

NR operating bands in FR1 and FR2.

This enumeration abstracts the NR operating bands for FR1 and FR2 described in TS 38.104, Table 5.2-1 and Table 5.2-2, respectively.

Remarks
: This is based on Rel. 17, version 17.8.0.
32 {
33 invalid = 0,
34 // FR1 bands.
35 n1 = 1,
36 n2 = 2,
37 n3 = 3,
38 n5 = 5,
39 n7 = 7,
40 n8 = 8,
41 n12 = 12,
42 n13 = 13,
43 n14 = 14,
44 n18 = 18,
45 n20 = 20,
46 n24 = 24,
47 n25 = 25,
48 n26 = 26,
49 n28 = 28,
50 n29 = 29,
51 n30 = 30,
52 n34 = 34,
53 n38 = 38,
54 n39 = 39,
55 n40 = 40,
56 n41 = 41,
57 n46 = 46,
58 n48 = 48,
59 n50 = 50,
60 n51 = 51,
61 n53 = 53,
62 n65 = 65,
63 n66 = 66,
64 n67 = 67,
65 n70 = 70,
66 n71 = 71,
67 n74 = 74,
68 n75 = 75,
69 n76 = 76,
70 n77 = 77,
71 n78 = 78,
72 n79 = 79,
73 n80 = 80,
74 n81 = 81,
75 n82 = 82,
76 n83 = 83,
77 n84 = 84,
78 n85 = 85,
79 n86 = 86,
80 n89 = 89,
81 n90 = 90,
82 n91 = 91,
83 n92 = 92,
84 n93 = 93,
85 n94 = 94,
86 n95 = 95,
87 n96 = 96,
88 n97 = 97,
89 n98 = 98,
90 n99 = 99,
91 n100 = 100,
92 n101 = 101,
93 n102 = 102,
94 n104 = 104,
95 // NTN bands
96 n255 = 255,
97 n256 = 256,
98 // FR2 bands.
99 n257 = 257,
100 n258 = 258,
101 n259 = 259,
102 n260 = 260,
103 n261 = 261,
104 n262 = 262,
105 n263 = 263
106};

◆ nzp_csi_rs_res_id_t

NZP-CSI-RS-ResourceId is used to identify one NZP-CSI-RS-Resource.

Remarks
See TS 38.331, NZP-CSI-RS-ResourceId and maxNrofNZP-CSI-RS-Resources.
31 : uint8_t {
32 MIN_NZP_CSI_RS_RESOURCE_ID = 0,
33 MAX_NZP_CSI_RS_RESOURCE_ID = 191,
34 MAX_NOF_NZP_CSI_RS_RESOURCES = 192
35};

◆ nzp_csi_rs_res_set_id_t

NZP-CSI-RS-ResourceSetId is used to identify one NZP-CSI-RS-ResourceSet.

Remarks
See TS 38.331, NZP-CSI-RS-ResourceSetId.
39 : uint8_t {
40 MIN_NZP_CSI_RS_RESOURCE_SET_ID = 0,
41 MAX_NZP_CSI_RS_RESOURCE_SET_ID = 63,
42 MAX_NOF_NZP_CSI_RS_RESOURCE_SETS = 64,
43 MAX_NOF_NZP_CSI_RS_RESOURCES_PER_SET = 16
44};

◆ openmode

file_vector open modes.

Enumerator
read_only 

Opens the file in read-only mode.

write_only 

Opens the file in write-only mode.

read_write 

Opens the file in read-write mode.

Any previous content of the file will be lost.

33 {
42};
@ read_write
Opens the file in read-write mode.
@ write_only
Opens the file in write-only mode.
@ read_only
Opens the file in read-only mode.

◆ p0_pusch_alphaset_id

enum srsran::p0_pusch_alphaset_id : uint8_t
33 : uint8_t {
34 MIN_P0_PUSCH_ALPHASET_ID = 0,
35 MAX_P0_PUSCH_ALPHASET_ID = 29,
36 MAX_NOF_P0_PUSCH_ALPHASETS = 30
37};

◆ paging_cycle

Default paging cycle, used to derive 'T' in TS 38.304. Value rf32 corresponds to 32 radio frames and so on.

Remarks
See TS 38.331, PagingCycle.
33{ rf32 = 32, rf64 = 64, rf128 = 128, rf256 = 256 };

◆ paging_identity_type

Type of Paging. RAN initiated or CN initiated.

31{ ran_ue_paging_identity, cn_ue_paging_identity };

◆ pdcp_control_pdu_type

PDCP Control PDU type Ref: TS 38.323 Sec. 6.3.8

Enumerator
status_report 

PDCP status report.

interspersed_rohc_feedback 

Interspersed ROHC feedback.

ehc_feedback 

EHC feedback.

61 : unsigned {
62 status_report = 0b000,
64 ehc_feedback = 0b010
65};
@ status_report
PDCP status report.
@ interspersed_rohc_feedback
Interspersed ROHC feedback.

◆ pdcp_dc_field

PDCP Data/Control (D/C) field Ref: TS 38.323 Sec. 6.3.7

Enumerator
control 

Control PDU.

data 

Data PDU.

42 : unsigned {
43 control = 0b00,
44 data = 0b01
45};

◆ pdcp_discard_timer

PDCP NR discard timer values. This timer is configured only for DRBs. In the transmitter, a new timer is started upon reception of an SDU from upper layer. See TS 38.322 for timer description and TS 38.331 for valid timer durations.

89 {
90 ms10 = 10,
91 ms20 = 20,
92 ms30 = 30,
93 ms40 = 40,
94 ms50 = 50,
95 ms60 = 60,
96 ms75 = 75,
97 ms100 = 100,
98 ms150 = 150,
99 ms200 = 200,
100 ms250 = 250,
101 ms300 = 300,
102 ms500 = 500,
103 ms750 = 750,
104 ms1500 = 1500,
105 infinity = -1
106};

◆ pdcp_rb_type

PDCP NR SRB or DRB information.

36{ srb, drb };

◆ pdcp_rlc_mode

PDCP NR RLC mode information.

39{ um, am };

◆ pdcp_security_direction

PDCP security direction.

83{ uplink, downlink };

◆ pdcp_sn_size

PDCP NR sequence number field.

42: uint8_t { size12bits = 12, size18bits = 18 };

◆ pdcp_t_reordering

PDCP NR t-Reordering timer values. This timer is used to detect loss of PDCP Data PDUs. See TS 38.322 for timer description and TS 38.331 for valid timer durations.

32 {
33 ms0 = 0,
34 ms1 = 1,
35 ms2 = 2,
36 ms4 = 4,
37 ms5 = 5,
38 ms8 = 8,
39 ms10 = 10,
40 ms15 = 15,
41 ms20 = 20,
42 ms30 = 30,
43 ms40 = 40,
44 ms50 = 50,
45 ms60 = 60,
46 ms80 = 80,
47 ms100 = 100,
48 ms120 = 120,
49 ms140 = 140,
50 ms160 = 160,
51 ms180 = 180,
52 ms200 = 200,
53 ms220 = 220,
54 ms240 = 240,
55 ms260 = 260,
56 ms280 = 280,
57 ms300 = 300,
58 ms500 = 500,
59 ms750 = 750,
60 ms1000 = 1000,
61 ms1250 = 1250,
62 ms1500 = 1500,
63 ms1750 = 1750,
64 ms2000 = 2000,
65 ms2250 = 2250,
66 ms2500 = 2500,
67 ms2750 = 2750,
68 ms3000 = 3000,
69 infinity = -1
70};

◆ pdsch_harq_ack_codebook

Options for pdsch-HARQ-ACK-Codebook, in PhysicalCellGroupConfig, TS 38.331.

30{ semistatic, dynamic };

◆ pdsch_mcs_table

Modulation and Code Scheme table identifiers for PDSCH.

The identifiers are inspired by TS38.331 Section as 6.3.2 (see field mcs-Table in various Information Elements). For the actual tables and the selection procedure, see TS38.214 Section 5.1.3.1.

Enumerator
qam64 

Identifies MCS index table 1, TS38.214 Table 5.1.3.1-1.

qam256 

Identifies MCS index table 2, TS38.214 Table 5.1.3.1-2.

qam64LowSe 

Identifies MCS index table 3, TS38.214 Table 5.1.3.1-3.

33 {
35 qam64 = 0,
37 qam256 = 1,
39 qam64LowSe = 2,
40};
@ qam64LowSe
Identifies MCS index table 3, TS38.214 Table 5.1.3.1-3.
@ qam256
Identifies MCS index table 2, TS38.214 Table 5.1.3.1-2.
@ qam64
Identifies MCS index table 1, TS38.214 Table 5.1.3.1-1.

◆ pdu_session_id_t

enum class srsran::pdu_session_id_t : uint16_t
strong

PDU Session ID.

Remarks
See TS 38.463 Section 9.3.1.21: PDU Session ID valid values: (0..255)
40: uint16_t { min = 0, max = MAX_NOF_PDU_SESSIONS - 1, invalid = MAX_NOF_PDU_SESSIONS };

◆ periodic_bsr_timer

periodicBSR-Timer, as part of BSR-Config, TS 38.331.

46 {
47 sf1 = 1,
48 sf5 = 5,
49 sf10 = 10,
50 sf16 = 16,
51 sf20 = 20,
52 sf32 = 32,
53 sf40 = 40,
54 sf64 = 64,
55 sf80 = 80,
56 sf128 = 128,
57 sf160 = 160,
58 sf320 = 320,
59 sf640 = 640,
60 sf1280 = 1280,
61 sf2560 = 2560,
62 infinity = 0
63};

◆ ph_field_type_t

Type of PH field reported by UE.

Remarks
See TS 38.321, 6.1.3.8 and 6.1.3.9.
43{ type1, type2, type3 };

◆ phr_mode_other_cg

phr-ModeOtherCG, in PHR-Config, TS 38.331.

101{ real, virtual_ };

◆ phr_periodic_timer

phr-PeriodicTimer, in PHR-Config, TS 38.331.

30 {
31 sf10 = 10,
32 sf20 = 20,
33 sf50 = 50,
34 sf100 = 100,
35 sf200 = 200,
36 sf500 = 500,
37 sf1000 = 1000,
38 infinity = 0
39};

◆ phr_prohibit_timer

phr-ProhibitTimer, in PHR-Config, TS 38.331.

48 {
49 sf0 = 0,
50 sf10 = 10,
51 sf20 = 20,
52 sf50 = 50,
53 sf100 = 100,
54 sf200 = 200,
55 sf500 = 500,
56 sf1000 = 1000
57};

◆ phr_tx_power_factor_change

phr-Tx-PowerFactorChange, in PHR-Config, TS 38.331.

91{ db1 = 1, db3 = 3, db6 = 6, infinity = 0 };

◆ pmi_codebook_type

CSI-RS PMI report codebook configuration.

Enumerator
one 

One CSI-RS antenna port.

two 

Two CSI-RS antenna ports.

typeI_single_panel_4ports_mode1 

PMI codebook TypeI, single-panel with four CSI-RS antenna ports and mode 1.

other 

Any other configuration.

35 {
37 one = 0,
39 two,
43 other
44};
@ typeI_single_panel_4ports_mode1
PMI codebook TypeI, single-panel with four CSI-RS antenna ports and mode 1.

◆ polar_code_ibil

Labels for the internal bit interleaver.

Enumerator
not_present 

Internal bit interleaver disabled.

present 

Internal bit interleaver enabled.

35 {
39 present
40};
@ not_present
Internal bit interleaver disabled.

◆ polar_interleaver_direction

enum class srsran::polar_interleaver_direction
strong
30{ tx, rx };

◆ port_channel_estimator_fd_smoothing_strategy

Port channel estimator frequency domain smoothing strategy.

Enumerator
none 

No smoothing strategy.

mean 

Averages all frequency domain estimates.

filter 

Filters in the frequency domain with a low pass filter.

28 {
30 none = 0,
32 mean,
34 filter,
35};

◆ prach_format_type

PRACH preamble formats.

PRACH preamble formats are described in TS38.211 Table 6.3.3.1-1 and 6.3.3.1-2.

31 : uint8_t {
32 zero = 0,
33 one,
34 two,
35 three,
36 A1,
37 A2,
38 A3,
39 B1,
40 B4,
41 C0,
42 C2,
43 A1_B1,
44 A2_B2,
45 A3_B3,
46 invalid
47};

◆ prach_subcarrier_spacing

Random Access subcarrier spacing.

31: uint8_t { kHz15 = 0, kHz30, kHz60, kHz120, kHz1_25, kHz5, invalid };

◆ prioritized_bit_rate

Prioritized Bit rate value in kiloBytes/s. See TS 38.331, prioritisedBitRate.

32 {
33 kBps0 = 0,
34 kBps8 = 8,
35 kBps16 = 16,
36 kBps32 = 32,
37 kBps64 = 64,
38 kBps128 = 128,
39 kBps256 = 256,
40 kBps512 = 512,
41 kBps1024 = 1024,
42 kBps2048 = 2048,
43 kBps4096 = 4096,
44 kBps8192 = 8192,
45 kBps16384 = 16384,
46 kBps32768 = 32768,
47 kBps65536 = 65536,
48 infinity = 65537,
49};

◆ protocol_transaction_failure

Error causes for the case of transactions that timed out or were cancelled.

47{ timeout, cancel, abnormal };

◆ psup_pdu_type

PSUP PDU Type

Ref: TS 38.415 Sec. 5.5.3.1

34: uint8_t { dl_pdu_session_information = 0, ul_pdu_session_information = 1 };

◆ psup_ppi

PSUP Paging Policy Indicator (PPI)

Ref: TS 38.415 Sec. 5.5.3.7

54: uint8_t { min = 0, max = MAX_NOF_PPI - 1, invalid = MAX_NOF_PPI };

◆ pucch_f4_occ_idx

Options for occ-Index in PUCCH-format4, in PUCCH-Config, TS 38.331.

55{ n0, n1, n2, n3 };

◆ pucch_f4_occ_len

Options for occ-Length in PUCCH-format4, in PUCCH-Config, TS 38.331.

52{ n2, n4 };

◆ pucch_format

PUCCH Formats as described in TS38.213 Section 9.2.

40{ FORMAT_0, FORMAT_1, FORMAT_2, FORMAT_3, FORMAT_4, NOF_FORMATS };

◆ pucch_format_4_sf

PUCCH Format 4 spreading factor.

52{ sf2, sf4 };

◆ pucch_group_hopping

Configuration of group and sequence hopping as described in TS38.331 PUCCH-ConfigCommon IE.

Enumerator
NEITHER 

Implies neither group or sequence hopping is enabled.

ENABLE 

Enables group hopping and disables sequence hopping.

DISABLE 

Disables group hopping and enables sequence hopping.

30 {
32 NEITHER,
34 ENABLE,
37};
@ NEITHER
Implies neither group or sequence hopping is enabled.
@ ENABLE
Enables group hopping and disables sequence hopping.
@ DISABLE
Disables group hopping and enables sequence hopping.

◆ pucch_repetition_tx_slot

Defines whether the PUCCH within the current slot belongs to a PUCCH repetition. For more details, refer to TS38.213, Section 9.2.6.

44{ no_multi_slot, starts, continues, ends };

◆ pusch_mcs_table

Modulation and Code Scheme table identifiers for PUSCH.

The identifiers are inspired by TS38.331 Section as 6.3.2 (see field mcs-Table in various Information Elements). For the actual tables and the selection procedure, see TS38.214 Section 6.1.4.1.

Enumerator
qam64 

Identifies MCS index table 1, TS38.214 Table 5.1.3.1-1.

qam256 

Identifies MCS index table 2, TS38.214 Table 5.1.3.1-2.

qam64LowSe 

Identifies MCS index table 3, TS38.214 Table 5.1.3.1-3.

qam64_tp 

Identifies MCS index table 1 with transform precoding, TS38.214 Table 6.1.4.1-1.

qam64LowSe_tp 

Identifies MCS index table 2 with transform precoding, TS38.214 Table 6.1.4.1-2.

33 {
35 qam64 = 0,
37 qam256 = 1,
39 qam64LowSe = 2,
41 qam64_tp = 3,
43 qam64LowSe_tp = 4,
44};
@ qam64LowSe_tp
Identifies MCS index table 2 with transform precoding, TS38.214 Table 6.1.4.1-2.
@ qam64_tp
Identifies MCS index table 1 with transform precoding, TS38.214 Table 6.1.4.1-1.

◆ qos_flow_id_t

QoS Flow ID.

Remarks
See TS 38.463 Section 9.3.1.21: QoS Flow ID valid values: (0..63)
59: uint8_t { min = 0, max = MAX_NOF_QOS_FLOWS - 1, invalid = MAX_NOF_QOS_FLOWS };

◆ qos_prio_level_t

QoS Priority Level.

34: uint8_t { min = 0, max = MAX_QOS_PRIO_LEVEL, invalid = MAX_QOS_PRIO_LEVEL + 1 };

◆ ran_ue_id_t

enum class srsran::ran_ue_id_t : uint64_t
strong
76: uint64_t { min = 0, max = MAX_NOF_RAN_UES - 1, invalid = 0x1ffffffff };

◆ rate_match_pattern_id_t

Rate matching pattern id used to identify a Rate matching pattern configuration.

Remarks
See TS 38.331, "RateMatchPatternId" and "maxNrofRateMatchPatterns".
33 : uint8_t {
34 MIN_RATE_MATCH_PATTERN_ID = 0,
35 MAX_RATE_MATCH_PATTERN_ID = 3,
36 MAX_NOF_RATE_MATCH_PATTERNS = 4
37};

◆ rb_type_t

Radio Bearer type, either SRB or DRB.

139{ srb, drb };

◆ rbg_size

RBG size types for PDSCH.

Remarks
See TS 38.331, "rbg-Size".
36{ config1, config2 };

◆ resource_allocation

Resource allocation type for DCI formats 0_1 and 1_1.

Remarks
See TS38.214 Sections 5.1.2.2 and 6.1.2.2.
40{ resource_allocation_type_0, resource_allocation_type_1, dynamic_switch };

◆ resource_grid_dimensions

Dimension, i.e. number of coordinates, of each indexing level of the resource grid.

31: unsigned { subc = 0, symbol = 1, port = 2, all = 3 };

◆ restricted_set_config

PRACH Restricted set configuration.

PRACH $N_{CS}$ restricted set configuration. Used for interpreting TS38.211 Tables 6.3.3.1-5 and 6.3.3.1-6.

30{ UNRESTRICTED, TYPE_A, TYPE_B };

◆ retx_bsr_timer

retxBSR-Timer, as part of BSR-Config, TS 38.331.

113 {
114 sf10 = 10,
115 sf20 = 20,
116 sf40 = 40,
117 sf80 = 80,
118 sf160 = 160,
119 sf320 = 320,
120 sf640 = 640,
121 sf1280 = 1280,
122 sf2560 = 2560,
123 sf5120 = 5120,
124 sf10240 = 10240
125};

◆ rlc_am_sn_size

enum class srsran::rlc_am_sn_size : uint16_t
strong

RLC AM NR sequence number field.

82: uint16_t { size12bits = 12, size18bits = 18 };

◆ rlc_control_pdu_type

enum class srsran::rlc_control_pdu_type : unsigned
strong
664: unsigned { status_pdu = 0b000 };

◆ rlc_dc_field

RLC AM NR segmentation info.

645: unsigned { control = 0b00, data = 0b01 };

◆ rlc_max_retx_threshold

enum class srsran::rlc_max_retx_threshold
strong
312{ t1 = 1, t2 = 2, t3 = 3, t4 = 4, t6 = 6, t8 = 8, t16 = 16, t32 = 32 };

◆ rlc_mode

RLC NR modes.

36{ tm, um_bidir, um_unidir_ul, um_unidir_dl, am };

◆ rlc_poll_kilo_bytes

enum class srsran::rlc_poll_kilo_bytes
strong
391 {
392 kB1 = 1,
393 kB2 = 2,
394 kB5 = 5,
395 kB8 = 8,
396 kB10 = 10,
397 kB15 = 15,
398 kB25 = 25,
399 kB50 = 50,
400 kB75 = 75,
401 kB100 = 100,
402 kB125 = 125,
403 kB250 = 250,
404 kB375 = 375,
405 kB500 = 500,
406 kB750 = 750,
407 kB1000 = 1000,
408 kB1250 = 1250,
409 kB1500 = 1500,
410 kB2000 = 2000,
411 kB3000 = 3000,
412 kB4000 = 4000,
413 kB4500 = 4500,
414 kB5000 = 5000,
415 kB5500 = 5500,
416 kB6000 = 6000,
417 kB6500 = 6500,
418 kB7000 = 7000,
419 kB7500 = 7500,
420 mB8 = 8000,
421 mB9 = 9000,
422 mB10 = 10000,
423 mB11 = 11000,
424 mB12 = 12000,
425 mB13 = 13000,
426 mB14 = 14000,
427 mB15 = 15000,
428 mB16 = 16000,
429 mB17 = 17000,
430 mB18 = 18000,
431 mB20 = 20000,
432 mB25 = 25000,
433 mB30 = 30000,
434 mB40 = 40000,
435 infinity = -1
436};

◆ rlc_poll_pdu

enum class srsran::rlc_poll_pdu
strong
331 {
332 p4 = 4,
333 p8 = 8,
334 p16 = 16,
335 p32 = 32,
336 p64 = 64,
337 p128 = 128,
338 p256 = 256,
339 p512 = 512,
340 p1024 = 1024,
341 p2048 = 2048,
342 p4096 = 4096,
343 p6144 = 6144,
344 p8192 = 8192,
345 p12288 = 12288,
346 p16384 = 16384,
347 p20480 = 20480,
348 p24576 = 24576,
349 p28672 = 28672,
350 p32768 = 32768,
351 p40960 = 40960,
352 p49152 = 49152,
353 p57344 = 57344,
354 p65536 = 65536,
355 infinity = -1
356};

◆ rlc_si_field

RLC AM NR segmentation info.

Enumerator
full_sdu 

Full SDU.

first_segment 

First SDU segment.

last_segment 

Last SDU segment.

middle_segment 

Middle SDU segment.

652 : unsigned {
653 full_sdu = 0b00,
654 first_segment = 0b01,
655 last_segment = 0b10,
656 middle_segment = 0b11
657};
@ first_segment
First SDU segment.
@ last_segment
Last SDU segment.
@ middle_segment
Middle SDU segment.

◆ rlc_t_poll_retransmit

enum class srsran::rlc_t_poll_retransmit
strong
181 {
182 ms5 = 5,
183 ms10 = 10,
184 ms15 = 15,
185 ms20 = 20,
186 ms25 = 25,
187 ms30 = 30,
188 ms35 = 35,
189 ms40 = 40,
190 ms45 = 45,
191 ms50 = 50,
192 ms55 = 55,
193 ms60 = 60,
194 ms65 = 65,
195 ms70 = 70,
196 ms75 = 75,
197 ms80 = 80,
198 ms85 = 85,
199 ms90 = 90,
200 ms95 = 95,
201 ms100 = 100,
202 ms105 = 105,
203 ms110 = 110,
204 ms115 = 115,
205 ms120 = 120,
206 ms125 = 125,
207 ms130 = 130,
208 ms135 = 135,
209 ms140 = 140,
210 ms145 = 145,
211 ms150 = 150,
212 ms155 = 155,
213 ms160 = 160,
214 ms165 = 165,
215 ms170 = 170,
216 ms175 = 175,
217 ms180 = 180,
218 ms185 = 185,
219 ms190 = 190,
220 ms195 = 195,
221 ms200 = 200,
222 ms205 = 205,
223 ms210 = 210,
224 ms215 = 215,
225 ms220 = 220,
226 ms225 = 225,
227 ms230 = 230,
228 ms235 = 235,
229 ms240 = 240,
230 ms245 = 245,
231 ms250 = 250,
232 ms300 = 300,
233 ms350 = 350,
234 ms400 = 400,
235 ms450 = 450,
236 ms500 = 500,
237 ms800 = 800,
238 ms1000 = 1000,
239 ms2000 = 2000,
240 ms4000 = 4000
241};

◆ rlc_t_reassembly

Converts sequence number field to numeric its value.

Parameters
sn_sizesequence number size
Returns
numeric value of the sequence number field
107 {
108 ms0 = 0,
109 ms5 = 5,
110 ms10 = 10,
111 ms15 = 15,
112 ms20 = 20,
113 ms25 = 25,
114 ms30 = 30,
115 ms35 = 35,
116 ms40 = 40,
117 ms45 = 45,
118 ms50 = 50,
119 ms55 = 55,
120 ms60 = 60,
121 ms65 = 65,
122 ms70 = 70,
123 ms75 = 75,
124 ms80 = 80,
125 ms85 = 85,
126 ms90 = 90,
127 ms95 = 95,
128 ms100 = 100,
129 ms110 = 110,
130 ms120 = 120,
131 ms130 = 130,
132 ms140 = 140,
133 ms150 = 150,
134 ms160 = 160,
135 ms170 = 170,
136 ms180 = 180,
137 ms190 = 190,
138 ms200 = 200
139};

◆ rlc_t_status_prohibit

enum class srsran::rlc_t_status_prohibit
strong
491 {
492 ms0 = 0,
493 ms5 = 5,
494 ms10 = 10,
495 ms15 = 15,
496 ms20 = 20,
497 ms25 = 25,
498 ms30 = 30,
499 ms35 = 35,
500 ms40 = 40,
501 ms45 = 45,
502 ms50 = 50,
503 ms55 = 55,
504 ms60 = 60,
505 ms65 = 65,
506 ms70 = 70,
507 ms75 = 75,
508 ms80 = 80,
509 ms85 = 85,
510 ms90 = 90,
511 ms95 = 95,
512 ms100 = 100,
513 ms105 = 105,
514 ms110 = 110,
515 ms115 = 115,
516 ms120 = 120,
517 ms125 = 125,
518 ms130 = 130,
519 ms135 = 135,
520 ms140 = 140,
521 ms145 = 145,
522 ms150 = 150,
523 ms155 = 155,
524 ms160 = 160,
525 ms165 = 165,
526 ms170 = 170,
527 ms175 = 175,
528 ms180 = 180,
529 ms185 = 185,
530 ms190 = 190,
531 ms195 = 195,
532 ms200 = 200,
533 ms205 = 205,
534 ms210 = 210,
535 ms215 = 215,
536 ms220 = 220,
537 ms225 = 225,
538 ms230 = 230,
539 ms235 = 235,
540 ms240 = 240,
541 ms245 = 245,
542 ms250 = 250,
543 ms300 = 300,
544 ms350 = 350,
545 ms400 = 400,
546 ms450 = 450,
547 ms500 = 500,
548 ms800 = 800,
549 ms1000 = 1000,
550 ms1200 = 1200,
551 ms1600 = 1600,
552 ms2000 = 2000,
553 ms2400 = 2400,
554};

◆ rlc_um_sn_size

enum class srsran::rlc_um_sn_size : uint16_t
strong

RLC UM NR sequence number field.

63: uint16_t { size6bits = 6, size12bits = 12 };

◆ rnti_t

enum class srsran::rnti_t : uint16_t
strong
Remarks
See TS 38.331 - RNTI-Value and TS 38.321, Table 7.1-1: RNTI Values. Values: (0..65535)
32 : uint16_t {
33 INVALID_RNTI = 0x0,
34 MIN_CRNTI = 0x1,
35 // ...
36 MAX_CRNTI = 0xffef,
37 MIN_RESERVED_RNTI = 0xfff0,
38 // ...
39 MAX_RESERVED_RNTI = 0xfffd,
40 P_RNTI = 0xfffe,
41 SI_RNTI = 0xffff
42};

◆ rx_buffer_status

enum class srsran::rx_buffer_status : uint8_t
strong
40: uint8_t { successful = 0, already_in_use, insufficient_cb };

◆ sch_mapping_type

Physical shared channels Mapping Type.

Remarks
see TS38.214 Section 5.3 for PDSCH and TS38.214 Section 6.4 for PUSCH.
Enumerator
typeA 

TypeA time allocation, it can start only at symbol 2 or 3 within a slot.

typeB 

TypeB time allocation.

90 {
92 typeA,
94 typeB
95};
@ typeA
TypeA time allocation, it can start only at symbol 2 or 3 within a slot.
@ typeB
TypeB time allocation.

◆ scheduling_request_id

SchedulingRequestResourceId, as per TS 38.331.

36: uint8_t { SR_ID_MIN = 0, SR_ID_MAX = 7 };

◆ sdap_hdr_dl_cfg

SDAP header options for DL.

36{ present = 0, absent };

◆ sdap_hdr_ul_cfg

SDAP header options for UL.

33{ present = 0, absent };

◆ search_space_id

Search Space identifier. This value is UE-specific, which means that a UE can have up to "maxNrofSearchSpaces=40" Search Spaces configured. The ID space is used across BWPs of a serving cell.

40: uint8_t { MIN_SEARCH_SPACE_ID = 0, MAX_SEARCH_SPACE_ID = 39, MAX_NOF_SEARCH_SPACES = 40 };

◆ search_space_set_type

Search Space Set Type as per TS38.213, Section 10.1.

48{ type0, type0A, type1, type2, type3, ue_specific };

◆ search_space_type

SearchSpace Type.

57{ common, ue_dedicated };

◆ serv_cell_index_t

ServCellIndex, as per TS 38.331. It concerns a short identity, used to uniquely identify a serving cell (from a UE's perspective) across cell groups. Value 0 applies to the PCell (Master Cell Group).

32 : uint8_t {
33 SERVING_CELL_PCELL_IDX = 0,
34 MAX_SERVING_CELL_IDX = 31,
35 MAX_NOF_SCELLS = 31,
36 MAX_NOF_SERVING_CELLS = 32,
37 SERVING_CELL_INVALID = MAX_NOF_SERVING_CELLS
38};

◆ sib1_rtx_periodicity

SIB retransmission periodicity in milliseconds as per TS38.331 Section 5.2.1.

Remarks
This is used for retransmission periodicity only; SIB1 periodicity is given as 160ms.
29{ ms5 = 5, ms10 = 10, ms20 = 20, ms40 = 40, ms80 = 80, ms160 = 160 };

◆ sib_type

enum class srsran::sib_type
strong
41{ sib1 = 1, sib2 = 2, sib19 = 19, sib_invalid };

◆ sr_max_tx

sr-TransMax possible values, for SchedulingRequestToAddMod, TS 38.331.

102{ n4 = 4, n8 = 8, n16 = 16, n32 = 32, n64 = 64 };

◆ sr_nof_bits

Labels that code how many bits are used for SR. For PUCCH Format 0-1, valid values: no_sr = no SR occasion; one = SR occasion. For PUCCH Format 2-3-4, all possible values are valid.

36: unsigned { no_sr = 0, one, two, three, four };

◆ sr_periodicity

Encodes the periodicity (only) of periodicityAndOffset for SchedulingRequestResourceConfig, TS 38.331. Note that the offset is encoded separately.

46 : int {
47 sym_2 = -2,
48 sym_6_or_7 = -1,
49 sl_1 = 1,
50 sl_2 = 2,
51 sl_4 = 4,
52 sl_5 = 5,
53 sl_8 = 8,
54 sl_10 = 10,
55 sl_16 = 16,
56 sl_20 = 20,
57 sl_40 = 40,
58 sl_80 = 80,
59 sl_160 = 160,
60 sl_320 = 320,
61 sl_640 = 640
62};

◆ sr_prohib_timer

sr-ProhibitTimer possible values, for SchedulingRequestToAddMod, TS 38.331.

74{ ms1, ms2, ms4, ms8, ms16, ms32, ms64, ms128 };

◆ srb_id_t

enum class srsran::srb_id_t : uint16_t
strong
52: uint16_t { srb0 = 0, srb1, srb2, srb3, nulltype };

◆ ssb_coreset0_mplex_pattern

Refer to "SS/PBCH block and CORESET multiplexing pattern", TS 38.213, Section 13.

32{ mplx_pattern1 = 0, mplx_pattern2, mplx_pattern3, mplex_invalid };

◆ ssb_id_t

SSB-Index identifies an SS-Block within an SS-Burst.

Remarks
See TS 38.331, "SSB-Index" and "maxNrofSSBs". See also, TS 38.213, clause 4.1.
32: uint8_t { MIN_SSB_ID = 0, MAX_SSB_ID = 63, MAX_NOF_SSB_RESOURCES = 64 };

◆ ssb_pattern_case

Labels for the different SS/PBCH block patterns defined in TS38.213 Section 4.1.

Enumerator

Case A - 15 kHz SCS, FR1: index pattern $\{2, 8\} + 14\cdot n$.

Case B - 30 kHz SCS, FR1: index pattern $\{4, 8, 16, 20\} + 28\cdot n$.

Case C - 30 kHz SCS, FR1: index pattern $\{2, 8\} + 14\cdot n$.

Case D - 120 kHz SCS, FR2: index pattern $\{4, 8, 16, 20\} + 28\cdot n$.

Case E - 240 kHz SCS, FR2: index pattern $\{8, 12, 16, 20, 32, 36, 40, 44 \} + 56\cdot n$.

invalid 

Invalid case.

45 {
47 A,
49 B,
51 C,
53 D,
55 E,
57 invalid
58};
@ C
Case C - 30 kHz SCS, FR1: index pattern .
@ A
Case A - 15 kHz SCS, FR1: index pattern .
@ B
Case B - 30 kHz SCS, FR1: index pattern .
@ D
Case D - 120 kHz SCS, FR2: index pattern .

◆ ssb_periodicity

SSB periodicity in milliseconds as per TS38.331 Section 6.3.2 IE ssb-periodicityServingCell.

33{ ms5 = 5, ms10 = 10, ms20 = 20, ms40 = 40, ms80 = 80, ms160 = 160 };

◆ ssb_pss_to_sss_epre

PSS EPRE to SSS EPRE for SSB, as per TS 38.213, Section 4.1.

42{ dB_0, dB_3 };

◆ subcarrier_spacing

Representation of subcarrier spacing.

34{ kHz15 = 0, kHz30, kHz60, kHz120, kHz240, invalid };

◆ t_evaluation

enum class srsran::t_evaluation
strong
76{ s30, s60, s120, s180, s240, spare3, spare2, spare1 };

◆ t_hyst_normal

enum class srsran::t_hyst_normal
strong
78{ s30, s60, s120, s180, s240, spare3, spare2, spare1 };

◆ tag_id_t

TAG-Id, TS 38.331.

31{ MAX_TAG_ID = 3, INVALID_TAG_ID = MAX_NOF_TAGS };
const unsigned MAX_NOF_TAGS
maxNrofTAGs, TS 38.331.
Definition time_alignment_group_config.h:28

◆ tci_state_id_t

TCI-State id used to identify a TCI-State configuration.

Remarks
See TS 38.331, "TCI-StateId" and "maxNrofTCI".
36: uint8_t { MIN_TCI_STATE_ID = 0, MAX_TCI_STATE_ID = 127, MAX_NOF_TCI_STATES = 128 };

◆ time_alignment_timer

TimeAlignmentTimer, TS 38.331.

40 {
41 ms500 = 500,
42 ms750 = 750,
43 ms1280 = 1280,
44 ms1920 = 1920,
45 ms2560 = 2560,
46 ms5120 = 5120,
47 ms10240 = 10240,
48 infinity = 0
49};

◆ timer_id_t

Type used to represent a unique timer identifier.

37: unsigned { invalid = std::numeric_limits<unsigned>::max() };

◆ tx_scheme_codebook_subset

Subset of PMIs addressed by TPMI, where PMIs are those supported by UEs with maximum coherence capabilities.

Remarks
See TS38.214, Section 6.1.1.1.
47 : unsigned {
48 fully_and_partial_and_non_coherent,
49 partial_and_non_coherent,
50 non_coherent
51};

◆ uci_pucch_f0_or_f1_harq_values

HARQ values for UCI PUCCH Format 0 or Format 1.

30{ nack, ack, dtx };

◆ uci_pusch_or_pucch_f2_3_4_detection_status

Indicates CRC result on UCI containing HARQ/CSI Part 1/CSI Part 2 data.

Enumerator
crc_pass 

Used when CRC was attached.

crc_failure 

Used when UE is expected to attach CRC.

dtx 

Undetected UCI.

no_dtx 

Indicates UCI detection.

dtx_not_checked 

Indicates that PHY did not check for UCI DTX.

65 {
67 crc_pass = 1,
71 dtx,
73 no_dtx,
76};
@ dtx_not_checked
Indicates that PHY did not check for UCI DTX.
@ crc_failure
Used when UE is expected to attach CRC.

◆ uci_status

Labels for the UCI decoding/detection status, common for both PUCCH and PUSCH UCI.

Enumerator
unknown 

Unknown status.

valid 

The UCI message is valid.

Messages longer than 11 bits are considered as valid when the CRC has passed. For shorter messages, the valid state means that the detection metric is above the threshold.

invalid 

The UCI message is invalid.

Messages longer than 11 bits are considered as invalid when the CRC failed. For shorter messages, the invalid state means that all detection metrics are below the threshold.

28 {
30 unknown = 0,
35 valid,
40 invalid
41};
@ valid
The UCI message is valid.
@ unknown
Unknown status.

◆ ue_cell_index_t

Maximum number of cells supported by a single UE.

65 : uint16_t {
66 PCELL_INDEX = 0,
67 MAX_UE_SCELL_INDEX = 15,
68 MAX_NOF_SCELL_INDEXES = 16,
69 INVALID_UE_CELL_INDEX = MAX_NOF_SCELL_INDEXES
70};

◆ x_overhead

xOverhead options, as per TS 38.331. Used in PDSCH-ServingCellConfig and PUSCH-ServingCellConfig.

44 {
45 not_set = 0,
46 xoh6 = 6,
47 xoh12 = 12,
48 xoh18 = 18,
49};

◆ zp_csi_rs_res_id_t

ZP-CSI-ResourceId is used to identify one ZP-CSI-Resource.

Remarks
See TS 38.331, ZP-CSI-RS-ResourceId.
74 : uint8_t {
75 MIN_ZP_CSI_RS_RESOURCE_ID = 0,
76 MAX_ZP_CSI_RS_RESOURCE_ID = 31,
77 MAX_NOF_ZP_CSI_RS_RESOURCES = 32
78};

◆ zp_csi_rs_res_set_id_t

ZP-CSI-ResourceSetId is used to identify one ZP-CSI-ResourceSet.

Remarks
See TS 38.331, ZP-CSI-RS-ResourceSetId.
82 : uint8_t {
83 MIN_ZP_CSI_RS_RESOURCE_SET_ID = 0,
84 MAX_ZP_CSI_RS_RESOURCE_SET_ID = 15,
85 MAX_NOF_ZP_CSI_RS_RESOURCE_SETS = 16,
86};

Function Documentation

◆ abs_sq()

constexpr float srsran::abs_sq ( cf_t x)
inlineconstexpr

Calculates the squared modulus of a complex value.

Parameters
[in]xComplex value.
Returns
The squared absolute of the given value, i.e. $\abs{x}^2=x\cdot\conj{x}=\Re(x)^2+\Im(x)^2$.
71{
72 // Equivalent to but computationally simpler than std::pow(std::abs(x),2).
73 return x.real() * x.real() + x.imag() * x.imag();
74}
Here is the caller graph for this function:

◆ add_auto_enum_option()

template<typename Param >
void srsran::add_auto_enum_option ( CLI::App & app,
const std::string & option_name,
optional< Param > & param,
const std::string & desc )

Parsing an integer with additional option "auto" into an optional of an enum type.

50{
51 app.add_option_function<std::string>(
52 option_name,
53 [&param](const std::string& in) -> void {
54 if (in.empty() or in == "auto") {
55 return;
56 }
57 std::stringstream ss(in);
58 std::underlying_type_t<Param> val;
59 ss >> val;
60 param = (Param)val;
61 },
62 desc)
63 ->check([](const std::string& in_str) -> std::string {
64 if (in_str == "auto" or in_str.empty()) {
65 return "";
66 }
67 // Check for a valid integer number;
68 CLI::TypeValidator<int> IntegerValidator("INTEGER");
69 return IntegerValidator(in_str);
70 })
71 ->default_str("auto");
72}

◆ advance_ptr()

constexpr void * srsran::advance_ptr ( void * pos,
std::size_t sz )
inlineconstexpr

Moves the pointer by the given size in bytes.

47{
48 return static_cast<char*>(pos) + sz;
49}

◆ aggregation_index_to_level()

aggregation_level srsran::aggregation_index_to_level ( uint8_t aggr_lvl_idx)
inline

Return aggregation level enum value.

50{
51 return static_cast<aggregation_level>(aggr_lvl_idx);
52}
aggregation_level
Aggregation Level of PDCCH allocation.
Definition aggregation_level.h:31

◆ align_next() [1/2]

constexpr std::uintptr_t srsran::align_next ( std::uintptr_t pos,
std::size_t alignment )
inlineconstexpr

Moves the pointer to the next aligned position.

53{
54 return (pos + (alignment - 1)) & ~(alignment - 1);
55}

◆ align_next() [2/2]

void * srsran::align_next ( void * pos,
std::size_t alignment )
inline
57{
58 return reinterpret_cast<void*>(align_next(reinterpret_cast<std::uintptr_t>(pos), alignment));
59}
constexpr std::uintptr_t align_next(std::uintptr_t pos, std::size_t alignment)
Moves the pointer to the next aligned position.
Definition memory_pool_utils.h:52

◆ allocate_mac_ces()

unsigned srsran::allocate_mac_ces ( dl_msg_tb_info & tb_info,
dl_logical_channel_manager & lch_mng,
unsigned total_tbs )

Allocate MAC subPDUs for pending MAC CEs.

Parameters
[in]tb_infoTB on which MAC subPDUs will be stored.
[in]lch_mngUE DL logical channel manager.
[in]total_tbsavailable space in bytes for subPDUs.
Returns
Total number of bytes allocated (including MAC subheaders).
Remarks
Excludes UE Contention Resolution Identity CE.
169{
170 unsigned rem_tbs = total_tbs;
171
172 while ((lch_mng.is_con_res_id_pending() or lch_mng.has_pending_ces()) and not tb_info.lc_chs_to_sched.full()) {
173 dl_msg_lc_info subpdu;
174 unsigned alloc_bytes = lch_mng.allocate_mac_ce(subpdu, rem_tbs);
175 if (alloc_bytes == 0) {
176 break;
177 }
178
179 // add new subPDU.
180 tb_info.lc_chs_to_sched.push_back(subpdu);
181
182 // update remaining space taking into account the MAC CE subheader.
184 }
185 return total_tbs - rem_tbs;
186}
constexpr Integer mask_msb_ones(size_t N)
Returns an unsigned integer with the N most significant bits (MSB) set to one, and the remaining bits...
Definition bounded_bitset.h:65
Definition scheduler_slot_handler.h:198

◆ allocate_mac_sdus()

unsigned srsran::allocate_mac_sdus ( dl_msg_tb_info & tb_info,
dl_logical_channel_manager & lch_mng,
unsigned total_tbs )

Allocate MAC SDUs and corresponding MAC subPDU subheaders.

Parameters
[in]tb_infoTB on which MAC subPDUs will be stored.
[in]lch_mngUE DL logical channel manager.
[in]total_tbsavailable space in bytes for subPDUs.
Returns
Total number of bytes allocated (including MAC subheaders).
146{
147 unsigned rem_tbs = total_tbs;
148
149 // if we do not have enough bytes to fit MAC subheader, skip MAC SDU allocation.
150 // Note: We assume upper layer accounts for its own subheaders when updating the buffer state.
151 while (rem_tbs > MAX_MAC_SDU_SUBHEADER_SIZE and not tb_info.lc_chs_to_sched.full()) {
152 dl_msg_lc_info subpdu;
153 unsigned alloc_bytes = lch_mng.allocate_mac_sdu(subpdu, rem_tbs);
154 if (alloc_bytes == 0) {
155 break;
156 }
157
158 // add new subPDU.
159 tb_info.lc_chs_to_sched.push_back(subpdu);
160
161 // update remaining space taking into account the MAC SDU subheader.
163 }
164
165 return total_tbs - rem_tbs;
166}

◆ allocate_ue_con_res_id_mac_ce()

unsigned srsran::allocate_ue_con_res_id_mac_ce ( dl_msg_tb_info & tb_info,
dl_logical_channel_manager & lch_mng,
unsigned total_tbs )

Allocate MAC subPDUs for pending UE Contention Resolution Identity MAC CE.

Parameters
[in]tb_infoTB on which MAC subPDUs will be stored.
[in]lch_mngUE DL logical channel manager.
[in]total_tbsavailable space in bytes for subPDUs.
Returns
Total number of bytes allocated (including MAC subheaders).
217{
218 unsigned rem_tbs = total_tbs;
219
220 if (not tb_info.lc_chs_to_sched.full()) {
221 dl_msg_lc_info subpdu;
222 unsigned alloc_bytes = lch_mng.allocate_ue_con_res_id_mac_ce(subpdu, rem_tbs);
223 if (alloc_bytes != 0) {
224 // add new subPDU.
225 tb_info.lc_chs_to_sched.push_back(subpdu);
226
227 // update remaining space taking into account the MAC CE subheader.
229 }
230 }
231 return total_tbs - rem_tbs;
232}

◆ alpha_scaling_to_float()

float srsran::alpha_scaling_to_float ( alpha_scaling_opt val)
inline
36{
37 switch (val) {
38 case alpha_scaling_opt::f0p5:
39 return 0.5f;
40 case alpha_scaling_opt::f0p65:
41 return 0.65f;
42 case alpha_scaling_opt::f0p8:
43 return 0.8f;
44 case alpha_scaling_opt::f1:
45 return 1.0f;
46 default:
47 // NOTE: This is not in the specs, but it is to prevent the compiler from flagging a warning for reaching the end
48 // of a non-void function without return statement.
49 srsran_assert(val > alpha_scaling_opt::f1, "Invalid Alpha scaling option");
50 return 1.0f;
51 }
52}

◆ any_cast() [1/5]

template<typename ValueType >
ValueType srsran::any_cast ( any && operand)
inline
48{
49 return linb::any_cast<ValueType>(std::move(operand));
50}

◆ any_cast() [2/5]

template<typename ValueType >
ValueType srsran::any_cast ( any & operand)
inline
42{
43 return linb::any_cast<ValueType>(operand);
44}

◆ any_cast() [3/5]

template<typename ValueType >
ValueType * srsran::any_cast ( any * operand)
inlinenoexcept
60{
61 return linb::any_cast<ValueType>(operand);
62}

◆ any_cast() [4/5]

template<typename ValueType >
ValueType srsran::any_cast ( const any & operand)
inline
36{
37 return linb::any_cast<ValueType>(operand);
38}

◆ any_cast() [5/5]

template<typename ValueType >
const ValueType * srsran::any_cast ( const any * operand)
inlinenoexcept
54{
55 return linb::any_cast<ValueType>(operand);
56}

◆ apply_addmodremlist_diff() [1/2]

void srsran::apply_addmodremlist_diff ( AddModList & src_and_dest_list,
const AddModList & add_diff_list,
const RemoveList & rm_diff_list,
const GetId & id_func )
118{
119 apply_addmodremlist_diff(src_and_dest_list, add_diff_list, rm_diff_list, src_and_dest_list, id_func);
120}
void apply_addmodremlist_diff(const AddModList &prev_list, const AddModList &add_diff_list, const RemoveList &rm_diff_list, AddModList &next_list, const GetId &id_func)
Definition asn1_diff_utils.h:77

◆ apply_addmodremlist_diff() [2/2]

void srsran::apply_addmodremlist_diff ( const AddModList & prev_list,
const AddModList & add_diff_list,
const RemoveList & rm_diff_list,
AddModList & next_list,
const GetId & id_func )

Apply toAddModList/toRemoveList changes

Parameters
prev_listoriginal list of rrc fields
add_diff_listadded/modified elements
rm_diff_listremoved elements
next_listresulting list. (Can be same as prev_list)
82{
83 if (add_diff_list.size() == 0 and rm_diff_list.size() == 0) {
84 if (&next_list != &prev_list) {
85 next_list = prev_list;
86 }
87 return;
88 }
89 auto id_cmp_op = make_id_comparator(id_func);
90 srsran_sanity_check(std::is_sorted(prev_list.begin(), prev_list.end(), id_cmp_op), "Expected sorted list");
91 srsran_sanity_check(std::is_sorted(add_diff_list.begin(), add_diff_list.end(), id_cmp_op), "Expected sorted list");
92 srsran_sanity_check(std::is_sorted(rm_diff_list.begin(), rm_diff_list.end()), "Expected sorted list");
93
94 AddModList tmp_lst;
95 // apply remove list
96 std::set_difference(prev_list.begin(),
97 prev_list.end(),
98 rm_diff_list.begin(),
99 rm_diff_list.end(),
100 std::back_inserter(tmp_lst),
101 id_cmp_op);
102
103 // apply toaddmodlist
104 next_list.clear();
105 std::set_union(add_diff_list.begin(),
106 add_diff_list.end(),
107 tmp_lst.begin(),
108 tmp_lst.end(),
109 std::back_inserter(next_list),
110 id_cmp_op);
111}

◆ are_all_unique()

template<typename Range >
bool srsran::are_all_unique ( const Range & r)

Check if all elements of a range are unique.

79{
80 return has_unique_ids(
81 r, [](const auto& e) -> const auto& { return e; });
82}
bool has_unique_ids(const Range &r, const IdentifierGetter &id_get)
Check if all elements of a range have a unique ID, which is provided via id_get.
Definition validator_helpers.h:51

◆ asn1_e1ap_to_qos_flow_map_item()

e1ap_qos_flow_map_item srsran::asn1_e1ap_to_qos_flow_map_item ( const asn1::e1ap::qos_flow_map_item_s & asn1_qos_flow_map_item)
inline

Convert E1AP ASN.1 QoS Flow Map Item to e1ap_qos_flow_map_item type.

1079{
1080 e1ap_qos_flow_map_item qos_flow_map_item;
1081 qos_flow_map_item.qos_flow_id = uint_to_qos_flow_id(asn1_qos_flow_map_item.qos_flow_id);
1082
1083 if (asn1_qos_flow_map_item.qos_flow_map_ind_present) {
1084 qos_flow_map_item.qos_flow_map_ind = asn1_qos_flow_map_item.qos_flow_map_ind.to_string();
1085 }
1086
1087 return qos_flow_map_item;
1088}
constexpr qos_flow_id_t uint_to_qos_flow_id(uint8_t idx)
Convert integer to QoS Flow ID type.
Definition cu_types.h:68
Definition e1ap_types.h:110

◆ asn1_label_2_enum()

e2sm_kpm_label_enum srsran::asn1_label_2_enum ( const asn1::e2sm_kpm::meas_label_s & meas_label)
106{
107 if (meas_label.no_label_present) {
108 return NO_LABEL;
109 }
110 if (meas_label.sum_present) {
111 return SUM_LABEL;
112 }
113 if (meas_label.min_present) {
114 return MIN_LABEL;
115 }
116 if (meas_label.max_present) {
117 return MAX_LABEL;
118 }
119 if (meas_label.avg_present) {
120 return AVG_LABEL;
121 }
122 if (meas_label.plmn_id_present) {
123 return PLMN_ID_LABEL;
124 }
125 if (meas_label.slice_id_present) {
126 return SLICE_ID_LABEL;
127 }
128 if (meas_label.five_qi_present) {
129 return FIVE_QI_LABEL;
130 }
131 if (meas_label.qfi_present) {
132 return QFI_LABEL;
133 }
134 if (meas_label.qci_present) {
135 return QCI_LABEL;
136 }
137 if (meas_label.qcimax_present) {
138 return QCI_MAX_LABEL;
139 }
140 if (meas_label.qcimin_present) {
141 return QCI_MIN_LABEL;
142 }
143 if (meas_label.arpmax_present) {
144 return ARP_MAX_LABEL;
145 }
146 if (meas_label.arpmin_present) {
147 return ARP_MIN_LABEL;
148 }
149 if (meas_label.bitrate_range_present) {
150 return BITRATE_RANGE_LABEL;
151 }
152 if (meas_label.layer_mu_mimo_present) {
153 return LAYER_MU_MIMO_LABEL;
154 }
155 if (meas_label.dist_bin_x_present) {
156 return DIST_BIN_X_LABEL;
157 }
158 if (meas_label.dist_bin_y_present) {
159 return DIST_BIN_Y_LABEL;
160 }
161 if (meas_label.dist_bin_z_present) {
162 return DIST_BIN_Z_LABEL;
163 }
164 if (meas_label.pre_label_override_present) {
165 return PRE_LABEL_OVERRIDE_LABEL;
166 }
167 if (meas_label.start_end_ind_present) {
168 return START_END_IND_LABEL;
169 }
170 if (meas_label.ssb_idx_present) {
171 return SSB_IDX_LABEL;
172 }
173 if (meas_label.non_go_b_bfmode_idx_present) {
174 return NON_GO_B_BFMODE_IDX_LABEL;
175 }
176 if (meas_label.mimo_mode_idx_present) {
177 return MIMO_MODE_IDX_LABEL;
178 }
179 return UNKNOWN_LABEL;
180}

◆ asn1_to_activity_notification_level()

activity_notification_level_t srsran::asn1_to_activity_notification_level ( const asn1::e1ap::activity_notif_level_e & asn1_activity_notification)
inline
1342{
1343 activity_notification_level_t activity_notification_level;
1344
1345 switch (asn1_activity_notification.value) {
1346 case asn1::e1ap::activity_notif_level_opts::options::drb:
1347 activity_notification_level = activity_notification_level_t::drb;
1348 break;
1349 case asn1::e1ap::activity_notif_level_opts::options::pdu_session:
1350 activity_notification_level = activity_notification_level_t::pdu_session;
1351 break;
1352 case asn1::e1ap::activity_notif_level_opts::options::ue:
1353 activity_notification_level = activity_notification_level_t::ue;
1354 break;
1355 default:
1356 activity_notification_level = activity_notification_level_t::invalid;
1357 break;
1358 }
1359
1360 return activity_notification_level;
1361}

◆ asn1_to_pdcp_discard_timer()

pdcp_discard_timer srsran::asn1_to_pdcp_discard_timer ( asn1::e1ap::discard_timer_e asn1_discard_timer)
inline

Converts E1AP ASN.1 discard timer type to pdcp_discard_timer type.

387{
388 pdcp_discard_timer discard_timer = {};
389
390 switch (asn1_discard_timer) {
391 case asn1::e1ap::discard_timer_opts::ms10:
392 discard_timer = pdcp_discard_timer::ms10;
393 break;
394 case asn1::e1ap::discard_timer_opts::ms20:
395 discard_timer = pdcp_discard_timer::ms20;
396 break;
397 case asn1::e1ap::discard_timer_opts::ms30:
398 discard_timer = pdcp_discard_timer::ms30;
399 break;
400 case asn1::e1ap::discard_timer_opts::ms40:
401 discard_timer = pdcp_discard_timer::ms40;
402 break;
403 case asn1::e1ap::discard_timer_opts::ms50:
404 discard_timer = pdcp_discard_timer::ms50;
405 break;
406 case asn1::e1ap::discard_timer_opts::ms60:
407 discard_timer = pdcp_discard_timer::ms60;
408 break;
409 case asn1::e1ap::discard_timer_opts::ms75:
410 discard_timer = pdcp_discard_timer::ms75;
411 break;
412 case asn1::e1ap::discard_timer_opts::ms100:
413 discard_timer = pdcp_discard_timer::ms100;
414 break;
415 case asn1::e1ap::discard_timer_opts::ms150:
416 discard_timer = pdcp_discard_timer::ms150;
417 break;
418 case asn1::e1ap::discard_timer_opts::ms200:
419 discard_timer = pdcp_discard_timer::ms200;
420 break;
421 case asn1::e1ap::discard_timer_opts::ms250:
422 discard_timer = pdcp_discard_timer::ms250;
423 break;
424 case asn1::e1ap::discard_timer_opts::ms300:
425 discard_timer = pdcp_discard_timer::ms300;
426 break;
427 case asn1::e1ap::discard_timer_opts::ms500:
428 discard_timer = pdcp_discard_timer::ms500;
429 break;
430 case asn1::e1ap::discard_timer_opts::ms750:
431 discard_timer = pdcp_discard_timer::ms750;
432 break;
433 case asn1::e1ap::discard_timer_opts::ms1500:
434 discard_timer = pdcp_discard_timer::ms1500;
435 break;
436 case asn1::e1ap::discard_timer_opts::infinity:
437 discard_timer = pdcp_discard_timer::infinity;
438 break;
439 default:
440 srsran_assert(false, "Unsupported PDCP discard timer. PDCP discard timer={}", asn1_discard_timer);
441 }
442 return discard_timer;
443}
pdcp_discard_timer
Definition pdcp_config.h:89

◆ asn1_to_pdcp_sn_size()

pdcp_sn_size srsran::asn1_to_pdcp_sn_size ( asn1::e1ap::pdcp_sn_size_e asn1_sn_size)
inline

Convert E1AP ASN.1 to PDCP SN size.

368{
369 pdcp_sn_size sn_size = {};
370
371 switch (asn1_sn_size) {
372 case asn1::e1ap::pdcp_sn_size_e::s_neg12:
373 sn_size = pdcp_sn_size::size12bits;
374 break;
375 case asn1::e1ap::pdcp_sn_size_e::s_neg18:
376 sn_size = pdcp_sn_size::size18bits;
377 break;
378 default:
379 srsran_assert(false, "Unsupported PDCP SN size. PDCP SN size={}", asn1_sn_size);
380 }
381
382 return sn_size;
383}
pdcp_sn_size
PDCP NR sequence number field.
Definition pdcp_config.h:42

◆ asn1_to_pdcp_t_reordering()

pdcp_t_reordering srsran::asn1_to_pdcp_t_reordering ( asn1::e1ap::t_reordering_e asn1_t_reordering)
inline

Converts E1AP ASN.1 t-Reordering type to pdcp_t_reordering type.

508{
509 pdcp_t_reordering t_reordering = {};
510
511 // t-Reordering
512 switch (asn1_t_reordering) {
513 case asn1::e1ap::t_reordering_e::ms0:
514 t_reordering = pdcp_t_reordering::ms0;
515 break;
516 case asn1::e1ap::t_reordering_e::ms1:
517 t_reordering = pdcp_t_reordering::ms1;
518 break;
519 case asn1::e1ap::t_reordering_e::ms2:
520 t_reordering = pdcp_t_reordering::ms2;
521 break;
522 case asn1::e1ap::t_reordering_e::ms4:
523 t_reordering = pdcp_t_reordering::ms4;
524 break;
525 case asn1::e1ap::t_reordering_e::ms5:
526 t_reordering = pdcp_t_reordering::ms5;
527 break;
528 case asn1::e1ap::t_reordering_e::ms8:
529 t_reordering = pdcp_t_reordering::ms8;
530 break;
531 case asn1::e1ap::t_reordering_e::ms10:
532 t_reordering = pdcp_t_reordering::ms10;
533 break;
534 case asn1::e1ap::t_reordering_e::ms15:
535 t_reordering = pdcp_t_reordering::ms15;
536 break;
537 case asn1::e1ap::t_reordering_e::ms20:
538 t_reordering = pdcp_t_reordering::ms20;
539 break;
540 case asn1::e1ap::t_reordering_e::ms30:
541 t_reordering = pdcp_t_reordering::ms30;
542 break;
543 case asn1::e1ap::t_reordering_e::ms40:
544 t_reordering = pdcp_t_reordering::ms40;
545 break;
546 case asn1::e1ap::t_reordering_e::ms50:
547 t_reordering = pdcp_t_reordering::ms50;
548 break;
549 case asn1::e1ap::t_reordering_e::ms60:
550 t_reordering = pdcp_t_reordering::ms60;
551 break;
552 case asn1::e1ap::t_reordering_e::ms80:
553 t_reordering = pdcp_t_reordering::ms80;
554 break;
555 case asn1::e1ap::t_reordering_e::ms100:
556 t_reordering = pdcp_t_reordering::ms100;
557 break;
558 case asn1::e1ap::t_reordering_e::ms120:
559 t_reordering = pdcp_t_reordering::ms120;
560 break;
561 case asn1::e1ap::t_reordering_e::ms140:
562 t_reordering = pdcp_t_reordering::ms140;
563 break;
564 case asn1::e1ap::t_reordering_e::ms160:
565 t_reordering = pdcp_t_reordering::ms160;
566 break;
567 case asn1::e1ap::t_reordering_e::ms180:
568 t_reordering = pdcp_t_reordering::ms180;
569 break;
570 case asn1::e1ap::t_reordering_e::ms200:
571 t_reordering = pdcp_t_reordering::ms200;
572 break;
573 case asn1::e1ap::t_reordering_e::ms220:
574 t_reordering = pdcp_t_reordering::ms220;
575 break;
576 case asn1::e1ap::t_reordering_e::ms240:
577 t_reordering = pdcp_t_reordering::ms240;
578 break;
579 case asn1::e1ap::t_reordering_e::ms260:
580 t_reordering = pdcp_t_reordering::ms260;
581 break;
582 case asn1::e1ap::t_reordering_e::ms280:
583 t_reordering = pdcp_t_reordering::ms280;
584 break;
585 case asn1::e1ap::t_reordering_e::ms300:
586 t_reordering = pdcp_t_reordering::ms300;
587 break;
588 case asn1::e1ap::t_reordering_e::ms500:
589 t_reordering = pdcp_t_reordering::ms500;
590 break;
591 case asn1::e1ap::t_reordering_e::ms750:
592 t_reordering = pdcp_t_reordering::ms750;
593 break;
594 case asn1::e1ap::t_reordering_e::ms1000:
595 t_reordering = pdcp_t_reordering::ms1000;
596 break;
597 case asn1::e1ap::t_reordering_e::ms1250:
598 t_reordering = pdcp_t_reordering::ms1250;
599 break;
600 case asn1::e1ap::t_reordering_e::ms1500:
601 t_reordering = pdcp_t_reordering::ms1500;
602 break;
603 case asn1::e1ap::t_reordering_e::ms1750:
604 t_reordering = pdcp_t_reordering::ms1750;
605 break;
606 case asn1::e1ap::t_reordering_e::ms2000:
607 t_reordering = pdcp_t_reordering::ms2000;
608 break;
609 case asn1::e1ap::t_reordering_e::ms2250:
610 t_reordering = pdcp_t_reordering::ms2250;
611 break;
612 case asn1::e1ap::t_reordering_e::ms2500:
613 t_reordering = pdcp_t_reordering::ms2500;
614 break;
615 case asn1::e1ap::t_reordering_e::ms2750:
616 t_reordering = pdcp_t_reordering::ms2750;
617 break;
618 case asn1::e1ap::t_reordering_e::ms3000:
619 t_reordering = pdcp_t_reordering::ms3000;
620 break;
621 default:
622 srsran_assert(false, "Unsupported PDCP t-reordering timer. PDCP t-reordering timer={}", asn1_t_reordering);
623 }
624
625 return t_reordering;
626}
pdcp_t_reordering
PDCP NR t-Reordering timer values. This timer is used to detect loss of PDCP Data PDUs....
Definition pdcp_t_reordering.h:32

◆ asn1_to_rlc_mode()

srsran::pdcp_rlc_mode srsran::asn1_to_rlc_mode ( asn1::e1ap::rlc_mode_e asn1_rlc_mod)
inline

Converts E1AP ASN.1 type to an rlc_mode type.

Parameters
asn1_rlc_modE1AP ASN.1 type.
Returns
The rlc_mode object where the result of the conversion is stored.
327{
329
330 switch (asn1_rlc_mod) {
331 case asn1::e1ap::rlc_mode_opts::rlc_um_bidirectional:
332 case asn1::e1ap::rlc_mode_opts::rlc_um_unidirectional_ul:
333 case asn1::e1ap::rlc_mode_opts::rlc_um_unidirectional_dl:
334 rlc_mode = srsran::pdcp_rlc_mode::um;
335 break;
336 case asn1::e1ap::rlc_mode_opts::rlc_am:
337 rlc_mode = srsran::pdcp_rlc_mode::am;
338 break;
339 default:
340 srsran_assert(false, "Invalid RLC mode: {}", asn1_rlc_mod.to_string());
341 break;
342 }
343
344 return rlc_mode;
345}
rlc_mode
RLC NR modes.
Definition rlc_config.h:36
pdcp_rlc_mode
PDCP NR RLC mode information.
Definition pdcp_config.h:39

◆ asn1_to_security_indication()

void srsran::asn1_to_security_indication ( security_indication_t & security_ind,
const asn1::e1ap::security_ind_s & asn1obj )
inline

Converts type security_indication to an ASN.1 type.

Parameters
asn1objASN.1 object where the result of the conversion is stored.
security_indicationSecurity Indication IE contents.
1449{
1450 switch (asn1obj.integrity_protection_ind) {
1451 case asn1::e1ap::integrity_protection_ind_opts::not_needed:
1452 case asn1::e1ap::integrity_protection_ind_opts::preferred:
1453 case asn1::e1ap::integrity_protection_ind_opts::required:
1454 security_ind.integrity_protection_ind =
1455 static_cast<integrity_protection_indication_t>(asn1obj.integrity_protection_ind.value);
1456 break;
1457 default:
1458 srslog::fetch_basic_logger("E1AP").error("Cannot convert security indication to E1AP type");
1459 }
1460
1461 switch (asn1obj.confidentiality_protection_ind) {
1462 case asn1::e1ap::confidentiality_protection_ind_opts::not_needed:
1463 case asn1::e1ap::confidentiality_protection_ind_opts::preferred:
1464 case asn1::e1ap::confidentiality_protection_ind_opts::required:
1465 security_ind.confidentiality_protection_ind =
1466 static_cast<confidentiality_protection_indication_t>(asn1obj.confidentiality_protection_ind.value);
1467 break;
1468 default:
1469 srslog::fetch_basic_logger("E1AP").error("Cannot convert security indication to E1AP type");
1470 }
1471}

◆ asn1_to_security_result()

void srsran::asn1_to_security_result ( security_result_t & security_result,
const asn1::e1ap::security_result_s & asn1obj )
inline

Converts ASN.1 type to security_result_t.

Parameters
[out]security_resultSecurity Result IE contents.
[in]asn1objASN.1 object from which the result is taken.
1394{
1395 switch (asn1obj.integrity_protection_result) {
1396 case asn1::e1ap::integrity_protection_result_opts::performed:
1397 case asn1::e1ap::integrity_protection_result_opts::not_performed:
1398 security_result.integrity_protection_result =
1399 static_cast<integrity_protection_result_t>(asn1obj.integrity_protection_result.value);
1400 break;
1401 default:
1402 srslog::fetch_basic_logger("E1AP").error("Cannot convert security result to E1AP type");
1403 }
1404
1405 switch (asn1obj.confidentiality_protection_result) {
1406 case asn1::e1ap::confidentiality_protection_result_opts::performed:
1407 case asn1::e1ap::confidentiality_protection_result_opts::not_performed:
1408 security_result.confidentiality_protection_result =
1409 static_cast<confidentiality_protection_result_t>(asn1obj.confidentiality_protection_result.value);
1410 break;
1411 default:
1412 srslog::fetch_basic_logger("E1AP").error("Cannot convert security result to E1AP type");
1413 }
1414}

◆ asn1_to_up_transport_layer_info()

template<typename Asn1Type >
up_transport_layer_info srsran::asn1_to_up_transport_layer_info ( Asn1Type & asn1obj)

Converts ASN.1 type into up_transport_layer_info.

Parameters
asn1objASN.1 object which is going to be converted.
Returns
UP Transport Layer Info object where the result of the conversion is stored.
62{
64 ret.gtp_teid = int_to_gtpu_teid(asn1obj.gtp_tunnel().gtp_teid.to_number());
65 ret.tp_address.from_bitstring(asn1obj.gtp_tunnel().transport_layer_address.to_string());
66 return ret;
67}
transport_layer_address & from_bitstring(std::string bit_str)
Converts a string of bits (each character is base 2) to a transport_layer_address.
Definition transport_layer_address.cpp:45
constexpr gtpu_teid_t int_to_gtpu_teid(uint32_t teid_val)
Convert integer to GTP-U TEID value.
Definition gtpu_teid.h:47
Identifier for F1-U transport layer associated to a DRB.
Definition up_transport_layer_info.h:31

◆ async_wait_for()

template<typename UniqueTimer >
auto srsran::async_wait_for ( UniqueTimer && timer,
std::chrono::milliseconds duration_msec )

Returns an awaitable object that is only ready when the passed duration_msec has elapsed.

Parameters
timerunique_timer object that is used to set the duration and timeout callback.
duration_msecduration in msec until the timer gets triggered.
Returns
awaitable object which returns true on resume if timer was notify_stop, and false if it expired.
36{
37 class async_timer
38 {
39 public:
40 async_timer(UniqueTimer timer_, std::chrono::milliseconds duration_) :
41 timer(std::forward<UniqueTimer>(timer_)), duration(duration_)
42 {
43 timer.stop();
44 }
45
46 bool await_ready() const { return duration.count() == 0; }
47
48 void await_suspend(coro_handle<> suspending_awaitable)
49 {
50 timer.set(duration, [ch = suspending_awaitable](timer_id_t tid) mutable { ch.resume(); });
51 timer.run();
52 }
53
54 bool await_resume() { return not timer.has_expired(); }
55
56 async_timer& get_awaiter() { return *this; }
57
58 private:
59 UniqueTimer timer;
60 std::chrono::milliseconds duration;
61 };
62
63 return async_timer{std::forward<UniqueTimer>(timer), duration_msec};
64}

◆ beta_csi_to_float()

float srsran::beta_csi_to_float ( unsigned beta_uint_val)

Maps the integer beta_offset value for CSI reporting into the corresponding float value.

The integer beta_offset value is passed by the PUSCH-Config, TS 38.331, and the mapping into the corresponding float value is determined as per Table 9.3-2, TS 38.213.

Parameters
beta_uint_valis the integer value as per BetaOffsets, TS 38.331.
Returns
The corresponding float value as per Table 9.3-2, TS 38.213.

The integer beta_offset value is passed by the PUSCH-Config, TS 38.331, and the mapping into the corresponding float value is determined as per Table 9.3-2, TS 38.213.

Parameters
[in]beta_uint_valis the integer value as per BetaOffsets, TS 38.331.
Remarks
The caller must ensure beta_uint_val < 19, so as not to incur in reserved values, as per Table 9.3-2, TS 38.213.
Returns
The corresponding float value as per Table 9.3-2, TS 38.213.
84{
85 // NOTE: ensure \c beta_uint_val < beta_offset_csi_values.size() before calling this method.
86 return beta_offset_csi_values[static_cast<size_t>(beta_uint_val)];
87}

◆ beta_harq_ack_to_float()

float srsran::beta_harq_ack_to_float ( unsigned beta_uint_val)

Maps the integer beta_offset value for HARQ-ACK reporting into the corresponding float value.

The integer beta_offset value is passed by the PUSCH-Config, TS 38.331, and the mapping into the corresponding float value is determined as per Table 9.3-1, TS 38.213.

Parameters
beta_uint_valis the integer value as per BetaOffsets, TS 38.331.
Returns
The corresponding float value as per Table 9.3-1, TS 38.213.

The integer beta_offset value is passed by the PUSCH-Config, TS 38.331, and the mapping into the corresponding float value is determined as per Table 9.3-1, TS 38.213.

Parameters
[in]beta_uint_valis the integer value as per BetaOffsets, TS 38.331.
Remarks
The caller must ensure beta_uint_val < 16, so as not to incur in reserved values, as per Table 9.3-1, TS 38.213.
Returns
The corresponding float value as per Table 9.3-1, TS 38.213.
78{
79 // NOTE: ensure \c beta_uint_val < beta_offset_harq_ack_values.size() before calling this method.
80 return beta_offset_harq_ack_values[static_cast<size_t>(beta_uint_val)];
81}

◆ bit_reverse()

uint64_t srsran::bit_reverse ( uint64_t n)
inline

Knuth's 64-bit reverse. E.g. 0x0000000000000001 -> 0x8000000000000000. For more information see: https://matthewarcus.wordpress.com/2012/11/18/reversing-a-64-bit-word/.

Parameters
nNumber to reverse.
Returns
Reversed number.
197{
198 static const uint64_t m0 = 0x5555555555555555LLU;
199 static const uint64_t m1 = 0x0300c0303030c303LLU;
200 static const uint64_t m2 = 0x00c0300c03f0003fLLU;
201 static const uint64_t m3 = 0x00000ffc00003fffLLU;
202 n = ((n >> 1U) & m0) | (n & m0) << 1U;
203 n = detail::swapbits<uint64_t, m1, 4>(n);
204 n = detail::swapbits<uint64_t, m2, 8>(n);
205 n = detail::swapbits<uint64_t, m3, 20>(n);
206 n = (n >> 34U) | (n << 30U);
207 return n;
208}

◆ bs_channel_bandwidth_to_MHz()

constexpr unsigned srsran::bs_channel_bandwidth_to_MHz ( bs_channel_bandwidth_fr1 bw)
inlineconstexpr

Converts the BS channel bandwidth label into the actual BW value in MHz.

51{
52 return static_cast<unsigned>(bw);
53}

◆ buff_size_field_to_bytes()

uint32_t srsran::buff_size_field_to_bytes ( size_t buff_size_index,
bsr_format format )

Converts the buffer size field of a BSR (5 or 8-bit Buffer Size field) into Nof Bytes.

Parameters
buff_size_indexThe buffer size field contained in the MAC PDU.
formatThe BSR format that determines the buffer size field length.
Returns
The actual buffer size level in Bytes.

Converts the buffer size field of a BSR (5 or 8-bit Buffer Size field) into Bytes.

Parameters
buff_size_indexThe buffer size field contained in the MAC PDU.
formatThe BSR format that determines the buffer size field length.
Returns
The actual buffer size level in Bytes.
137{
138 // Difference between the 2nd largest and the largest UL buffer size in bytes (Implementation-defined).
139 static constexpr uint32_t max_offset = 150000;
140
141 // early exit
142 if (buff_size_index == 0) {
143 return 0;
144 }
145
146 switch (format) {
147 case bsr_format::SHORT_BSR:
148 case bsr_format::SHORT_TRUNC_BSR: {
149 const size_t idx = std::min(buff_size_index, buffer_size_levels_5bit.size() - 1);
150 const uint32_t offset = buff_size_index >= buffer_size_levels_5bit.size() - 1 ? max_offset : 0;
151 return buffer_size_levels_5bit[idx] + offset;
152 } break;
153 case bsr_format::LONG_BSR:
154 case bsr_format::LONG_TRUNC_BSR: {
155 const size_t idx = std::min(buff_size_index, buffer_size_levels_8bit.size() - 1);
156 const uint32_t offset = buff_size_index >= buffer_size_levels_8bit.size() - 1 ? max_offset : 0;
157 return buffer_size_levels_8bit[idx] + offset;
158 } break;
159 default:
160 break;
161 }
162 return 0;
163}

◆ build_dci_f0_0_c_rnti()

void srsran::build_dci_f0_0_c_rnti ( dci_ul_info & dci,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
const crb_interval & crbs,
unsigned time_resource,
sch_mcs_index mcs_index,
uint8_t rv,
const ul_harq_process & h_ul )

Builds DCI f0_0 for C-RNTI.

357{
358 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
359 const bwp_configuration& active_ul_bwp = ss_info.bwp->ul_common->generic_params;
360 const bwp_uplink_common& init_ul_bwp = *ue_cell_cfg.bwp(to_bwp_id(0)).ul_common;
361
362 dci.type = dci_ul_rnti_config_type::c_rnti_f0_0;
363 dci.c_rnti_f0_0 = {};
364 dci_0_0_c_rnti_configuration& f0_0 = dci.c_rnti_f0_0;
365
366 // TODO.
367 f0_0.N_ul_hop = 0;
368 f0_0.hopping_offset = 0;
369 f0_0.frequency_hopping_flag = 0;
370 f0_0.tpc_command = 1;
371 f0_0.ul_sul_indicator = {};
372
373 // PDCCH params.
374 const dci_sizes& dci_sz = ss_info.dci_sz;
375
376 f0_0.payload_size =
377 not ss_info.cfg->is_common_search_space() ? dci_sz.format0_0_ue_size.value() : dci_sz.format0_0_common_size;
378
379 // PUSCH resources.
380 // See 38.212, clause 7.3.1.1.1 - N^{UL,BWP}_RB for C-RNTI.
381 const unsigned N_ul_bwp_rb =
382 ss_info.cfg->is_common_search_space() ? init_ul_bwp.generic_params.crbs.length() : active_ul_bwp.crbs.length();
383 const vrb_interval vrbs = rb_helper::crb_to_vrb_ul_non_interleaved(crbs, active_ul_bwp.crbs.start());
384 f0_0.frequency_resource =
386
387 f0_0.time_resource = time_resource;
388
389 f0_0.modulation_coding_scheme = mcs_index.to_uint();
390
391 // HARQ params.
392 f0_0.harq_process_number = h_ul.id;
393 f0_0.new_data_indicator = h_ul.tb().ndi;
394 f0_0.redundancy_version = rv;
395}
constexpr Integer to_uint() const
Returns the underlying value. This method is only enabled if the type is unsigned.
Definition bounded_integer.h:87
length_type length() const
Interval length. e.g. [0, 1), [0, 1], [0 .. 1) have length 1. [0 .. 1] has length 2.
Definition interval.h:63
constexpr bwp_id_t to_bwp_id(std::underlying_type_t< bwp_id_t > value)
Converts integer value to BWP-Id".
Definition bwp_configuration.h:64
unsigned ra_frequency_type1_get_riv(const ra_frequency_type1_configuration &config)
Calculates the resource indication value as per TS38.214 Section 5.1.2.2.2 for Downlink and Section ...
Definition resource_allocation_frequency.cpp:29
Definition bwp_configuration.h:71
crb_interval crbs
Common RBs where the BWP is located. CRB=0 overlaps with pointA.
Definition bwp_configuration.h:75
Required parameters for packing a DCI format 0_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI.
Definition dci_packing.h:536
DCI payload sizes.
Definition dci_packing.h:497
optional< dci_0_0_size > format0_0_ue_size
Payload size parameters for a DCI format 0_0 message monitored in a UE-specific search space.
Definition dci_packing.h:505
dci_0_0_size format0_0_common_size
Payload size parameters for a DCI format 0_0 message monitored in a common search space.
Definition dci_packing.h:499
Describes the resource allocation in frequency domain for Type1 as per TS38.214 Section 5....
Definition resource_allocation_frequency.h:35
Grouping of common and UE-dedicated information associated with a given search space.
Definition ue_configuration.h:53
Struct to express a {min,...,max} range of VRB indexes.
Definition rb_interval.h:40

◆ build_dci_f0_0_tc_rnti()

void srsran::build_dci_f0_0_tc_rnti ( dci_ul_info & dci,
const bwp_downlink_common & init_dl_bwp,
const bwp_configuration & ul_bwp,
const crb_interval & crbs,
unsigned time_resource,
sch_mcs_index mcs_index,
uint8_t rv,
const ul_harq_process & h_ul )

Builds DCI f0_0 for TC-RNTI, used in Msg3 retxs.

311{
312 // See TS38.321, 5.4.2.1 - "For UL transmission with UL grant in RA Response, HARQ process identifier 0 is used."
313 srsran_assert(h_ul.id == 0, "UL HARQ process used for Msg3 must have id=0");
314
315 dci.type = dci_ul_rnti_config_type::tc_rnti_f0_0;
316 dci.tc_rnti_f0_0 = {};
317 dci_0_0_tc_rnti_configuration& f0_0 = dci.tc_rnti_f0_0;
318
319 // TODO.
320 f0_0.N_ul_hop = 0;
321 f0_0.hopping_offset = 0;
322 f0_0.frequency_hopping_flag = 0;
323 f0_0.tpc_command = 1;
324
325 // PUSCH params.
326 const auto dci_sz_cfg = dci_size_config{
327 false,
328 false,
329 init_dl_bwp.generic_params.crbs.length(),
330 init_dl_bwp.generic_params.crbs.length(),
331 ul_bwp.crbs.length(),
332 ul_bwp.crbs.length(),
333 init_dl_bwp.pdcch_common.coreset0.has_value() ? init_dl_bwp.pdcch_common.coreset0->coreset0_crbs().length() : 0,
334 false};
335 srsran_assert(validate_dci_size_config(dci_sz_cfg), "Invalid DCI size configuration for DCI Format 0_0 (TC-RNTI)");
336 dci_sizes dci_sz = get_dci_sizes(dci_sz_cfg);
337 f0_0.payload_size = dci_sz.format0_0_common_size;
338 const vrb_interval vrbs = rb_helper::crb_to_vrb_ul_non_interleaved(crbs, ul_bwp.crbs.start());
339 f0_0.frequency_resource =
341 f0_0.time_resource = time_resource;
342
343 f0_0.modulation_coding_scheme = mcs_index.to_uint();
344
345 // HARQ params.
346 f0_0.redundancy_version = rv;
347}
bool validate_dci_size_config(const dci_size_config &config)
Validates a DCI configuration for the DCI size alignment procedure.
Definition dci_packing.cpp:1558
dci_sizes get_dci_sizes(const dci_size_config &config)
DCI payload size alignment procedure.
Definition dci_packing.cpp:696
Required parameters for packing a DCI format 0_0 scrambled by TC-RNTI.
Definition dci_packing.h:588
DCI configuration parameters required to perform the DCI size alignment procedure.
Definition dci_packing.h:59
optional< coreset_configuration > coreset0
Contains Coreset#0.
Definition bwp_configuration.h:47

◆ build_dci_f0_1_c_rnti()

void srsran::build_dci_f0_1_c_rnti ( dci_ul_info & dci,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
const crb_interval & crbs,
unsigned time_resource,
sch_mcs_index mcs_index,
uint8_t rv,
const ul_harq_process & h_ul,
unsigned total_dai,
unsigned nof_layers )

Builds DCI f0_1 for C-RNTI.

407{
408 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
409 srsran_assert(not ss_info.cfg->is_common_search_space(), "SearchSpace must be of type UE-Specific SearchSpace");
410
411 const bwp_configuration& active_ul_bwp = ss_info.bwp->ul_common->generic_params;
412
413 dci.type = dci_ul_rnti_config_type::c_rnti_f0_1;
414 dci.c_rnti_f0_1 = {};
415 dci_0_1_configuration& f0_1 = dci.c_rnti_f0_1;
416
417 const dci_sizes& dci_sz = ss_info.dci_sz;
418
419 f0_1.payload_size = dci_sz.format0_1_ue_size.value();
420
421 f0_1.ul_sul_indicator = {};
422 f0_1.tpc_command = 1;
423 f0_1.srs_request = 0;
424 f0_1.dmrs_seq_initialization = 0;
425 // TODO: Set proper value based on nof. layers used. See TS 38.212, clause 7.3.1.1.2.
426 // PHY does not support nof. DMRS CDM groups(s) without data other than 2, hence selected antenna port value from
427 // Table 7.3.1.1.2-8 in TS 38.212 based on assumption of max. rank 1 and DMRS max. length 1.
428 f0_1.antenna_ports = 2;
429
430 // See 38.212, clause 7.3.1.1.2 - N^{UL,BWP}_RB for C-RNTI.
431 const vrb_interval vrbs = rb_helper::crb_to_vrb_ul_non_interleaved(crbs, active_ul_bwp.crbs.start());
432 f0_1.frequency_resource = ra_frequency_type1_get_riv(
433 ra_frequency_type1_configuration{active_ul_bwp.crbs.length(), vrbs.start(), vrbs.length()});
434 f0_1.time_resource = time_resource;
435
436 f0_1.modulation_coding_scheme = mcs_index.to_uint();
437
438 // HARQ params.
439 f0_1.harq_process_number = h_ul.id;
440 f0_1.new_data_indicator = h_ul.tb().ndi;
441 f0_1.redundancy_version = rv;
442
443 // TODO: Set values for -
444 // - srs_resource_indicator
445 // - precoding_info_nof_layers
446 // - beta_offset_indicator
447 // - ptrs_dmrs_association
448 // - cbg_transmission_info
449
450 // DAI is set based on TS 38.213, clause 9.1.3.2.
451 f0_1.first_dl_assignment_index = dai;
452 f0_1.ul_sch_indicator = 1;
453}
Required parameters for packing a DCI format 0_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-R...
Definition dci_packing.h:791
optional< dci_0_1_size > format0_1_ue_size
Payload size parameters for a DCI format 0_1 message monitored in a UE-specific search space.
Definition dci_packing.h:513

◆ build_dci_f1_0_c_rnti()

void srsran::build_dci_f1_0_c_rnti ( dci_dl_info & dci,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
crb_interval crbs,
unsigned time_resource,
unsigned k1,
unsigned pucch_res_indicator,
unsigned dai,
sch_mcs_index mcs_index,
uint8_t rv,
const dl_harq_process & h_dl )

Builds DCI f1_0 for C-RNTI.

177{
178 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
179 const coreset_configuration& cs_cfg = *ss_info.coreset;
180 const bwp_downlink_common& active_dl_bwp_cmn = *ss_info.bwp->dl_common;
181 const bwp_downlink_common& init_dl_bwp = *ue_cell_cfg.bwp(to_bwp_id(0)).dl_common;
182 const bwp_configuration& active_dl_bwp = active_dl_bwp_cmn.generic_params;
183
184 dci.type = dci_dl_rnti_config_type::c_rnti_f1_0;
185 dci.c_rnti_f1_0 = {};
186 dci_1_0_c_rnti_configuration& f1_0 = dci.c_rnti_f1_0;
187
188 f1_0.tpc_command = 1;
189 f1_0.vrb_to_prb_mapping = 0;
190
191 // PDSCH resources.
192 // See 38.212, clause 7.3.1.2.1 - N^{DL,BWP}_RB for C-RNTI.
193 unsigned N_rb_dl_bwp = active_dl_bwp.crbs.length();
194 if (ss_info.cfg->is_common_search_space() and init_dl_bwp.pdcch_common.coreset0.has_value()) {
195 N_rb_dl_bwp = init_dl_bwp.pdcch_common.coreset0->coreset0_crbs().length();
196 }
197 // See TS38.211 7.3.1.6 - Mapping from VRBs to PRBs.
198 const vrb_interval vrbs = rb_helper::crb_to_vrb_dl_non_interleaved(crbs,
199 active_dl_bwp.crbs.start(),
200 cs_cfg.get_coreset_start_crb(),
201 dci_dl_format::f1_0,
202 ss_info.cfg->is_common_search_space());
203 f1_0.frequency_resource =
205 f1_0.time_resource = time_resource;
206
207 const dci_sizes& dci_sz = ss_info.dci_sz;
208
209 // Compute DCI size.
210 f1_0.payload_size =
211 not ss_info.cfg->is_common_search_space() ? dci_sz.format1_0_ue_size.value() : dci_sz.format1_0_common_size;
212
213 // UCI resources.
214 f1_0.pucch_resource_indicator = pucch_res_indicator;
215 f1_0.pdsch_harq_fb_timing_indicator = get_dci_1_0_pdsch_to_harq_timing_indicator(k1);
216 f1_0.dl_assignment_index = dai;
217
218 f1_0.modulation_coding_scheme = mcs_index.to_uint();
219
220 // HARQ params.
221 f1_0.harq_process_number = h_dl.id;
222 f1_0.new_data_indicator = h_dl.tb(0).ndi;
223 f1_0.redundancy_version = rv;
224}
Definition coreset.h:52
unsigned get_coreset_start_crb() const
Computes the lowest RB used by the CORESET.
Definition coreset.h:124
Required parameters for packing a DCI format 1_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI.
Definition dci_packing.h:631
dci_1_0_size format1_0_common_size
Payload size parameters for a DCI format 1_0 message monitored in a common search space.
Definition dci_packing.h:501
optional< dci_1_0_size > format1_0_ue_size
Payload size parameters for a DCI format 1_0 message monitored in a UE-specific search space.
Definition dci_packing.h:509

◆ build_dci_f1_0_p_rnti()

void srsran::build_dci_f1_0_p_rnti ( dci_dl_info & dci,
const bwp_downlink_common & init_dl_bwp,
crb_interval crbs,
unsigned time_resource,
sch_mcs_index mcs_index )

Builds DCI f1_0 for P-RNTI used in PCCHs.

84{
85 dci.type = dci_dl_rnti_config_type::p_rnti_f1_0;
86 dci.p_rnti_f1_0 = {};
87 auto& p_dci = dci.p_rnti_f1_0;
88 // See 38.212, clause 7.3.1.2.1 - N^{DL,BWP}_RB for P-RNTI.
89 p_dci.N_rb_dl_bwp = init_dl_bwp.pdcch_common.coreset0->coreset0_crbs().length();
91 crb_to_vrb_f1_0_common_ss_non_interleaved(crbs, init_dl_bwp.pdcch_common.coreset0->get_coreset_start_crb());
92 p_dci.frequency_resource = ra_frequency_type1_get_riv(
93 ra_frequency_type1_configuration{p_dci.N_rb_dl_bwp, paging_vrbs.start(), paging_vrbs.length()});
94 p_dci.time_resource = time_resource;
95 // As per Table 7.3.1.2.2-5, TS 38.212, 0 = non-interleaved, 1 = interleaved.
96 // TODO: Verify if interleaved is suitable for Paging.
97 p_dci.vrb_to_prb_mapping = 0;
98 p_dci.short_messages_indicator = dci_1_0_p_rnti_configuration::payload_info::scheduling_information;
99 p_dci.modulation_coding_scheme = mcs_index.to_uint();
100}
vrb_interval crb_to_vrb_f1_0_common_ss_non_interleaved(crb_interval crbs, unsigned coreset_crb_start)
Conversion of CRBs to VRBs for a common search space and DCI format 1_0 as per TS38....
Definition rb_interval.h:85
unsigned N_rb_dl_bwp
Parameter . It must be set to CORESET0 size.
Definition dci_packing.h:678

◆ build_dci_f1_0_ra_rnti()

void srsran::build_dci_f1_0_ra_rnti ( dci_dl_info & dci,
const bwp_downlink_common & init_dl_bwp,
crb_interval crbs,
unsigned time_resource,
sch_mcs_index mcs_index )

Builds DCI f1_0 for RA-RNTI used in RAR.

107{
108 dci.type = dci_dl_rnti_config_type::ra_f1_0;
109 dci.ra_f1_0 = {};
111 // as per TS38.212, clause 7.3.1.2.1 - N^{DL,BWP}_RB.
112 ra_dci.N_rb_dl_bwp = init_dl_bwp.pdcch_common.coreset0.has_value()
113 ? init_dl_bwp.pdcch_common.coreset0->coreset0_crbs().length()
114 : init_dl_bwp.generic_params.crbs.length();
115 const vrb_interval rar_vrbs =
116 crb_to_vrb_f1_0_common_ss_non_interleaved(crbs, init_dl_bwp.pdcch_common.coreset0->get_coreset_start_crb());
117 ra_dci.frequency_resource = ra_frequency_type1_get_riv(
118 ra_frequency_type1_configuration{ra_dci.N_rb_dl_bwp, rar_vrbs.start(), rar_vrbs.length()});
119 ra_dci.vrb_to_prb_mapping = 0;
120 ra_dci.time_resource = time_resource;
121 ra_dci.modulation_coding_scheme = mcs_index.to_uint();
122 ra_dci.tb_scaling = 0; // TODO.
123}
Required parameters for packing a DCI format 1_0 scrambled by RA-RNTI.
Definition dci_packing.h:733
unsigned N_rb_dl_bwp
Parameter .
Definition dci_packing.h:739

◆ build_dci_f1_0_si_rnti()

void srsran::build_dci_f1_0_si_rnti ( dci_dl_info & dci,
const bwp_downlink_common & init_dl_bwp,
crb_interval crbs,
unsigned time_resource,
sch_mcs_index mcs_index,
uint8_t si_indicator )

Builds DCI f1_0 for SI-RNTI used in SIBs.

58{
59 dci.type = dci_dl_rnti_config_type::si_f1_0;
60 dci.si_f1_0 = {};
62 // as per TS38.212, clause 7.3.1.2.1 - N^{DL,BWP}_RB.
63 si_dci.N_rb_dl_bwp = init_dl_bwp.pdcch_common.coreset0->coreset0_crbs().length();
64 const vrb_interval si_vrbs =
65 crb_to_vrb_f1_0_common_ss_non_interleaved(crbs, init_dl_bwp.pdcch_common.coreset0->get_coreset_start_crb());
66 si_dci.frequency_resource = ra_frequency_type1_get_riv(
67 ra_frequency_type1_configuration{si_dci.N_rb_dl_bwp, si_vrbs.start(), si_vrbs.length()});
68 // As per Table 7.3.1.2.2-5, TS 38.212, 0 = non-interleaved, 1 = interleaved.
69 // TODO: Verify if interleaved is suitable for SIB1.
70 si_dci.vrb_to_prb_mapping = 0;
71 si_dci.time_resource = time_resource;
72 si_dci.modulation_coding_scheme = mcs_index.to_uint();
73 // Redundancy version for first transmission.
74 // TODO: Check what is the best RV for SIB1.
75 si_dci.redundancy_version = 0;
76 si_dci.system_information_indicator = si_indicator;
77}
Required parameters for packing a DCI format 1_0 scrambled by SI-RNTI.
Definition dci_packing.h:709
unsigned N_rb_dl_bwp
Parameter . It must be set to CORESET0 size.
Definition dci_packing.h:711

◆ build_dci_f1_0_tc_rnti()

void srsran::build_dci_f1_0_tc_rnti ( dci_dl_info & dci,
const bwp_downlink_common & init_dl_bwp,
crb_interval crbs,
unsigned time_resource,
unsigned k1,
unsigned pucch_res_indicator,
sch_mcs_index mcs_index,
uint8_t rv,
const dl_harq_process & h_dl )

Builds DCI f1_0 for TC-RNTI, used for instance in Msg4.

134{
135 static constexpr unsigned tb_idx = 0;
136
137 dci.type = dci_dl_rnti_config_type::tc_rnti_f1_0;
138 dci.tc_rnti_f1_0 = {};
139 dci_1_0_tc_rnti_configuration& f1_0 = dci.tc_rnti_f1_0;
140
141 f1_0.tpc_command = 1;
142 f1_0.vrb_to_prb_mapping = 0;
143
144 // PDSCH resources.
145 // See 38.212, clause 7.3.1.2.1 - N^{DL,BWP}_RB is the size of CORESET 0 for TC-RNTI.
146 const crb_interval cs0_crbs = init_dl_bwp.pdcch_common.coreset0->coreset0_crbs();
147 f1_0.N_rb_dl_bwp = cs0_crbs.length();
148 // See TS38.211 7.3.1.6 - Mapping from VRBs to PRBs.
150 f1_0.frequency_resource =
151 ra_frequency_type1_get_riv(ra_frequency_type1_configuration{f1_0.N_rb_dl_bwp, vrbs.start(), vrbs.length()});
152 f1_0.time_resource = time_resource;
153
154 // UCI resources.
155 f1_0.pucch_resource_indicator = pucch_res_indicator;
156 f1_0.pdsch_harq_fb_timing_indicator = get_dci_1_0_pdsch_to_harq_timing_indicator(k1);
157
158 f1_0.modulation_coding_scheme = mcs_index.to_uint();
159
160 // HARQ params.
161 f1_0.harq_process_number = h_dl.id;
162 f1_0.new_data_indicator = h_dl.tb(tb_idx).ndi;
163 f1_0.redundancy_version = rv;
164}
Struct to express a {min,...,max} range of CRB indexes within a carrier.
Definition rb_interval.h:30
Required parameters for packing a DCI format 1_0 scrambled by TC-RNTI.
Definition dci_packing.h:760

◆ build_dci_f1_1_c_rnti()

void srsran::build_dci_f1_1_c_rnti ( dci_dl_info & dci,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
prb_interval prbs,
unsigned time_resource,
unsigned k1,
unsigned pucch_res_indicator,
unsigned dai,
sch_mcs_index tb1_mcs_index,
uint8_t rv,
const dl_harq_process & h_dl,
unsigned nof_layers )

Builds DCI f1_1 for C-RNTI.

238{
239 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
240 srsran_assert(not ss_info.cfg->is_common_search_space(), "SearchSpace must be of type UE-Specific SearchSpace");
241
242 // TODO: Update the value based on nof. CWs enabled.
243 static const bool are_both_cws_enabled = false;
244
245 const bwp_downlink_common& active_dl_bwp_cmn = *ss_info.bwp->dl_common;
246 const bwp_configuration& active_dl_bwp = active_dl_bwp_cmn.generic_params;
247 const auto k1_candidates = ss_info.get_k1_candidates();
248 const auto& opt_pdsch_cfg = ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg;
249
250 dci.type = dci_dl_rnti_config_type::c_rnti_f1_1;
251 dci.c_rnti_f1_1 = {};
252 dci_1_1_configuration& f1_1 = dci.c_rnti_f1_1;
253
254 f1_1.tpc_command = 1;
255 f1_1.srs_request = 0;
256 f1_1.dmrs_seq_initialization = 0;
257 srsran_assert(ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg->pdsch_mapping_type_a_dmrs.has_value(),
258 "No DMRS configured in PDSCH configuration");
259 const auto& dmrs_cfg = ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg->pdsch_mapping_type_a_dmrs.value();
260 f1_1.antenna_ports = get_pdsch_antenna_port_mapping_row_index(
261 nof_layers,
262 ue_cell_cfg.cell_cfg_common.dl_carrier.nof_ant,
263 dmrs_cfg.is_dmrs_type2 ? dmrs_config_type::type2 : dmrs_config_type::type1,
264 dmrs_cfg.is_max_length_len2 ? dmrs_max_length::len2 : dmrs_max_length::len1,
266
267 // See 38.212, clause 7.3.1.2.2 - N^{DL,BWP}_RB for C-RNTI.
268 f1_1.frequency_resource = ra_frequency_type1_get_riv(
269 ra_frequency_type1_configuration{active_dl_bwp.crbs.length(), prbs.start(), prbs.length()});
270 f1_1.time_resource = time_resource;
271
272 const dci_size_config& dci_sz_cfg = ss_info.dci_sz_cfg;
273 const dci_sizes& dci_sz = ss_info.dci_sz;
274
275 // Compute DCI size.
276 f1_1.payload_size = dci_sz.format1_1_ue_size.value();
277
278 if (dci_sz_cfg.interleaved_vrb_prb_mapping.has_value() and dci_sz_cfg.interleaved_vrb_prb_mapping.value()) {
279 if (opt_pdsch_cfg.value().vrb_to_prb_itlvr.has_value()) {
280 f1_1.vrb_prb_mapping = static_cast<unsigned>(opt_pdsch_cfg.value().vrb_to_prb_itlvr.value());
281 }
282 }
283
284 // TODO:
285 // 1. When Dynamic PRB bundling is used, set prb_bundling_size_indicator.
286 // 2. When Maximum number of code-block-groups (CBGs) is configured, set cbg_transmission_info.
287 // 3. When DMRS configuration is set in PDSCH-Config, set dmrs_seq_initialization based on whether scramblingID0 or
288 // scramblingID1 to be used.
289
290 // UCI resources.
291 f1_1.pucch_resource_indicator = pucch_res_indicator;
292 f1_1.pdsch_harq_fb_timing_indicator = get_dci_1_1_pdsch_to_harq_timing_indicator(k1, k1_candidates);
293 f1_1.downlink_assignment_index = dai;
294
295 f1_1.tb1_modulation_coding_scheme = tb1_mcs_index.to_uint();
296
297 // HARQ params.
298 f1_1.harq_process_number = h_dl.id;
299 f1_1.tb1_new_data_indicator = h_dl.tb(0).ndi;
300 f1_1.tb1_redundancy_version = rv;
301}
carrier_configuration dl_carrier
Imported from mac_cell_configuration.
Definition cell_configuration.h:56
constexpr bool has_value() const noexcept
Definition optional.h:298
dmrs_max_length
The maximum number of OFDM symbols for DL front loaded DMRS. If set to len2, the UE determines the ac...
Definition dmrs.h:52
unsigned get_pdsch_antenna_port_mapping_row_index(unsigned nof_layers, unsigned nof_dl_antenna_ports, dmrs_config_type dmrs_cfg_type, dmrs_max_length dmrs_max_len, bool are_both_cws_enabled)
Returns the PDSCH antenna ports mapping row index in TS 38.212, tables 7.3.1.2.2-1/2/3/4.
Definition pdsch_antenna_port_mapping.cpp:293
dmrs_config_type
Definition dmrs.h:38
uint16_t nof_ant
Number of antennas. Values: (0..65355).
Definition carrier_configuration.h:40
Required parameters for packing a DCI format 1_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-R...
Definition dci_packing.h:968
optional< bool > interleaved_vrb_prb_mapping
Interleaved VRB-to-PRB mapping flag.
Definition dci_packing.h:340
optional< dci_1_1_size > format1_1_ue_size
Payload size parameters for a DCI format 1_1 message monitored in a UE-specific search space.
Definition dci_packing.h:517
bwp_downlink_dedicated init_dl_bwp
Initial Downlink BWP.
Definition serving_cell_config.h:252

◆ build_pdsch_f1_0_c_rnti()

void srsran::build_pdsch_f1_0_c_rnti ( pdsch_information & pdsch,
const pdsch_config_params & pdsch_cfg,
unsigned tbs_bytes,
rnti_t rnti,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
const dci_1_0_c_rnti_configuration & dci_cfg,
const crb_interval & crbs,
bool is_new_data )

Builds PDSCH PDU for DCI format 1_0, scrambled by C-RNTI.

459{
460 const cell_configuration& cell_cfg = ue_cell_cfg.cell_cfg_common;
461 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
462 const coreset_configuration& cs_cfg = *ss_info.coreset;
463 const bwp_info& active_bwp = *ss_info.bwp;
464 const bwp_downlink_common& bwp_dl = *active_bwp.dl_common;
465
466 pdsch.rnti = rnti;
467 pdsch.bwp_cfg = &bwp_dl.generic_params;
468 pdsch.coreset_cfg = &cs_cfg;
469
470 // See 3GPP TS 38.211, clause 7.3.1.6 - VRBs are shifted from PRBs by an offset equal to the coreset start.
471 if (ss_info.cfg->is_common_search_space()) {
472 pdsch.rbs =
473 vrb_interval{crbs.start() - cs_cfg.get_coreset_start_crb(), crbs.stop() - cs_cfg.get_coreset_start_crb()};
474 } else {
475 const prb_interval prbs = crb_to_prb(bwp_dl.generic_params.crbs, crbs);
476 pdsch.rbs = vrb_interval{prbs.start(), prbs.stop()};
477 }
478 pdsch.symbols = pdsch_cfg.symbols;
479 pdsch.dmrs = pdsch_cfg.dmrs;
480 pdsch.is_interleaved = dci_cfg.vrb_to_prb_mapping > 0;
481 // See TS38.213, 10.1.
482 pdsch.ss_set_type =
483 not ss_info.cfg->is_common_search_space() ? search_space_set_type::ue_specific : search_space_set_type::type3;
484 pdsch.dci_fmt = dci_dl_format::f1_0;
485 pdsch.harq_id = to_harq_id(dci_cfg.harq_process_number);
486 // See TS 38.211, 7.3.1.1. - Scrambling.
487 const bwp_downlink_dedicated* bwp_dl_ded = active_bwp.dl_ded;
488 pdsch.n_id = get_pdsch_n_id(cell_cfg.pci, bwp_dl_ded, dci_dl_format::f1_0, ss_info.cfg->is_common_search_space());
489 pdsch.nof_layers = 1;
490
491 // One Codeword.
492 pdsch_codeword& cw = pdsch.codewords.emplace_back();
493 cw.new_data = is_new_data;
494 cw.rv_index = dci_cfg.redundancy_version;
495 cw.mcs_index = dci_cfg.modulation_coding_scheme;
496 cw.mcs_table = pdsch_cfg.mcs_table;
497 cw.mcs_descr = pdsch_mcs_get_config(pdsch_cfg.mcs_table, cw.mcs_index);
498 cw.tb_size_bytes = tbs_bytes;
499}
Definition cell_configuration.h:36
unsigned crb_to_prb(crb_interval bwp_crb_lims, unsigned crb)
Convert CRB into PRB given the CRB assignment limits. The CRB and PRB are assumed to use the same num...
Definition rb_interval.h:49
sch_mcs_description pdsch_mcs_get_config(pdsch_mcs_table table, sch_mcs_index index)
Gets the Modulation and Coding Scheme configuration for PDSCH.
Definition pdsch_mcs.cpp:28
Grouping of common and UE-dedicated information associated with a given BWP.
Definition ue_configuration.h:38
PDSCH codeword.
Definition scheduler_slot_handler.h:149
uint32_t tb_size_bytes
Transport block size, in bytes (see TS38.214 Section 5.1.3.2).
Definition scheduler_slot_handler.h:160
pdsch_mcs_table mcs_table
MCS table (See TS38.214 Section 5.1.3.1).
Definition scheduler_slot_handler.h:156
bool new_data
Whether this is the first Tx or retx of the HARQ codeword.
Definition scheduler_slot_handler.h:162
sch_mcs_index mcs_index
MCS index, range {0, ..., 31} (See TS38.214 Section 5.1.3.1).
Definition scheduler_slot_handler.h:154
sch_mcs_description mcs_descr
Modulation and coding scheme.
Definition scheduler_slot_handler.h:151
uint8_t rv_index
Redundancy version index (see TS38.212 Table 5.4.2.1-2, and TS38.214 Table 5.1.2.1-2).
Definition scheduler_slot_handler.h:158
harq_id_t harq_id
HARQ process number as per TS38.212 Section 7.3.1.1. Values: {0,...,15}.
Definition scheduler_slot_handler.h:183
bool is_interleaved
Whether the PDSCH is interleaved via VRB-to-PRB mapping.
Definition scheduler_slot_handler.h:179
unsigned nof_layers
Number of layers as per TS 38.211, Section 7.3.1.3. Values: {1,...,8}.
Definition scheduler_slot_handler.h:177
unsigned n_id
Parameter n_ID, used for scrambling, as per TS 38.211, Section 7.3.1.1.
Definition scheduler_slot_handler.h:175
Struct to express a {min,...,max} range of PRB indexes within a BWP.
Definition rb_interval.h:35

◆ build_pdsch_f1_0_p_rnti()

void srsran::build_pdsch_f1_0_p_rnti ( pdsch_information & pdsch,
const cell_configuration & cell_cfg,
unsigned tbs_bytes,
const dci_1_0_p_rnti_configuration & dci_cfg,
const crb_interval & crbs,
const ofdm_symbol_range & symbols,
const dmrs_information & dmrs_info )

Builds PDSCH PDU for DCI format 1_0, scrambled by P-RNTI.

332{
333 const bwp_downlink_common& bwp_dl = cell_cfg.dl_cfg_common.init_dl_bwp;
334 const search_space_configuration& ss_cfg =
335 bwp_dl.pdcch_common.search_spaces[*bwp_dl.pdcch_common.paging_search_space_id];
336 const coreset_configuration& cs_cfg =
337 ss_cfg.get_coreset_id() == to_coreset_id(0) ? *bwp_dl.pdcch_common.coreset0 : *bwp_dl.pdcch_common.common_coreset;
338 const vrb_interval vrbs =
339 crb_to_vrb_f1_0_common_ss_non_interleaved(crbs, bwp_dl.pdcch_common.coreset0->get_coreset_start_crb());
340
341 pdsch.rnti = rnti_t::P_RNTI;
342 pdsch.bwp_cfg = &bwp_dl.generic_params;
343 pdsch.coreset_cfg = &cs_cfg;
344 pdsch.symbols = symbols;
345 pdsch.rbs = vrbs;
346 // As per TS 38.211, Section 7.3.1.1, n_ID is set to Physical Cell ID.
347 pdsch.n_id = cell_cfg.pci;
348 pdsch.nof_layers = 1;
349
350 pdsch_codeword& cw = pdsch.codewords.emplace_back();
351 cw.mcs_index = dci_cfg.modulation_coding_scheme;
352 cw.mcs_table = pdsch_mcs_table::qam64;
354 cw.tb_size_bytes = tbs_bytes;
355 pdsch.dmrs = dmrs_info;
356 pdsch.is_interleaved = dci_cfg.vrb_to_prb_mapping > 0;
357 pdsch.ss_set_type = search_space_set_type::type2;
358 pdsch.dci_fmt = dci_dl_format::f1_0;
359}
SearchSpace configuration as per TS38.331, "SearchSpace".
Definition search_space.h:60
coreset_id get_coreset_id() const
Returns CORESET Id of the SearchSpace.
Definition search_space.h:122

◆ build_pdsch_f1_0_ra_rnti()

void srsran::build_pdsch_f1_0_ra_rnti ( pdsch_information & pdsch,
unsigned tbs_bytes,
rnti_t rnti,
const cell_configuration & cell_cfg,
const dci_1_0_ra_rnti_configuration & dci_cfg,
const crb_interval & crbs,
const dmrs_information & dmrs_info )

Builds PDSCH PDU for DCI format 1_0, scrambled by RA-RNTI.

368{
369 const bwp_downlink_common& bwp_dl = cell_cfg.dl_cfg_common.init_dl_bwp;
370 const search_space_configuration& ss_cfg = bwp_dl.pdcch_common.search_spaces[bwp_dl.pdcch_common.ra_search_space_id];
371 const coreset_configuration& cs_cfg =
372 ss_cfg.get_coreset_id() == to_coreset_id(0) ? *bwp_dl.pdcch_common.coreset0 : *bwp_dl.pdcch_common.common_coreset;
374 crbs, cell_cfg.dl_cfg_common.init_dl_bwp.pdcch_common.coreset0->get_coreset_start_crb());
375 const auto& pdsch_td_res_alloc_list =
376 get_ra_rnti_pdsch_time_domain_list(cell_cfg.dl_cfg_common.init_dl_bwp.pdsch_common,
377 cell_cfg.dl_cfg_common.init_dl_bwp.generic_params.cp,
378 cell_cfg.dmrs_typeA_pos);
379
380 pdsch.rnti = rnti;
381 pdsch.bwp_cfg = &bwp_dl.generic_params;
382 pdsch.coreset_cfg = &cs_cfg;
383 pdsch.rbs = vrbs;
384 pdsch.symbols = pdsch_td_res_alloc_list[dci_cfg.time_resource].symbols;
385
386 pdsch_codeword& cw = pdsch.codewords.emplace_back();
387 cw.mcs_table = pdsch_mcs_table::qam64;
388 cw.mcs_index = dci_cfg.modulation_coding_scheme;
389 cw.rv_index = 0; // Implementation-defined.
391 cw.tb_size_bytes = tbs_bytes;
392
393 pdsch.dmrs = dmrs_info;
394 // As per TS 38.211, Section 7.3.1.1, n_ID is set to Physical Cell ID for RA-RNTI.
395 pdsch.n_id = cell_cfg.pci;
396 pdsch.nof_layers = 1;
397 pdsch.is_interleaved = dci_cfg.vrb_to_prb_mapping > 0;
398 pdsch.ss_set_type = search_space_set_type::type1;
399 pdsch.dci_fmt = dci_dl_format::f1_0;
400}
span< const pdsch_time_domain_resource_allocation > get_ra_rnti_pdsch_time_domain_list(const pdsch_config_common &pdsch_common, cyclic_prefix cp, dmrs_typeA_position dmrs_typeA_pos)
Determines the time domain resource allocation table to be used for PDSCH scheduled with RA-RNTI as p...
Definition pdsch_default_time_allocation.cpp:198

◆ build_pdsch_f1_0_si_rnti()

void srsran::build_pdsch_f1_0_si_rnti ( pdsch_information & pdsch,
const cell_configuration & cell_cfg,
unsigned tbs_bytes,
const dci_1_0_si_rnti_configuration & dci_cfg,
const crb_interval & crbs,
const ofdm_symbol_range & symbols,
const dmrs_information & dmrs_info )

Builds PDSCH PDU for DCI format 1_0, scrambled by SI-RNTI.

298{
299 const bwp_downlink_common& bwp_dl = cell_cfg.dl_cfg_common.init_dl_bwp;
300 const vrb_interval vrbs =
301 crb_to_vrb_f1_0_common_ss_non_interleaved(crbs, bwp_dl.pdcch_common.coreset0->get_coreset_start_crb());
302
303 pdsch.rnti = rnti_t::SI_RNTI;
304 pdsch.bwp_cfg = &bwp_dl.generic_params;
305 pdsch.coreset_cfg = &*bwp_dl.pdcch_common.coreset0;
306 pdsch.symbols = symbols;
307 pdsch.rbs = vrbs;
308 // As per TS 38.211, Section 7.3.1.1, n_ID is set to Physical Cell ID for SIB1.
309 pdsch.n_id = cell_cfg.pci;
310 pdsch.nof_layers = 1;
311
312 pdsch_codeword& cw = pdsch.codewords.emplace_back();
313 cw.rv_index = dci_cfg.redundancy_version;
314 cw.mcs_index = dci_cfg.modulation_coding_scheme;
315 cw.mcs_table = pdsch_mcs_table::qam64;
317 cw.tb_size_bytes = tbs_bytes;
318 pdsch.dmrs = dmrs_info;
319 pdsch.is_interleaved = dci_cfg.vrb_to_prb_mapping > 0;
320 pdsch.ss_set_type =
321 dci_cfg.system_information_indicator == 0 ? search_space_set_type::type0 : search_space_set_type::type0A;
322 pdsch.dci_fmt = dci_dl_format::f1_0;
323}

◆ build_pdsch_f1_0_tc_rnti()

void srsran::build_pdsch_f1_0_tc_rnti ( pdsch_information & pdsch,
const pdsch_config_params & pdsch_cfg,
unsigned tbs_bytes,
rnti_t rnti,
const cell_configuration & cell_cfg,
const dci_1_0_tc_rnti_configuration & dci_cfg,
const crb_interval & crbs,
bool is_new_data )

Builds PDSCH PDU for DCI format 1_0, scrambled by TC-RNTI.

410{
411 const bwp_downlink_common& bwp_dl = cell_cfg.dl_cfg_common.init_dl_bwp;
412
413 pdsch.rnti = rnti;
414
415 // PDSCH resources.
416 pdsch.bwp_cfg = &bwp_dl.generic_params;
417 // See 3GPP TS 38.213, clause 10.1 - CSS set configured by ra-SearchSpace is used for CRC scrambled by TC-RNTI.
418 const search_space_configuration& ss = bwp_dl.pdcch_common.search_spaces[bwp_dl.pdcch_common.ra_search_space_id];
419 if (ss.get_coreset_id() == to_coreset_id(0)) {
420 pdsch.coreset_cfg = &*bwp_dl.pdcch_common.coreset0;
421 } else {
422 pdsch.coreset_cfg = &*bwp_dl.pdcch_common.common_coreset;
423 }
424 // See 3GPP TS 38.211, clause 7.3.1.6 - VRBs are shifted from PRBs by an offset equal to the coreset start.
425 const vrb_interval vrbs = {crbs.start() - pdsch.coreset_cfg->get_coreset_start_crb(),
426 crbs.stop() - pdsch.coreset_cfg->get_coreset_start_crb()};
427 pdsch.rbs = vrbs;
428 pdsch.symbols = pdsch_cfg.symbols;
429
430 pdsch.dmrs = pdsch_cfg.dmrs;
431 // See TS 38.211, 7.3.1.1. - Scrambling.
432 pdsch.n_id = cell_cfg.pci;
433 pdsch.is_interleaved = dci_cfg.vrb_to_prb_mapping > 0;
434 // See TS38.213, 10.1. - Type1-PDCCH CSS set for CRC scrambled by a TC-RNTI on the PCell.
435 pdsch.ss_set_type = search_space_set_type::type1;
436 pdsch.dci_fmt = dci_dl_format::f1_0;
437 pdsch.harq_id = to_harq_id(dci_cfg.harq_process_number);
438 pdsch.nof_layers = 1U;
439
440 // One Codeword.
441 pdsch_codeword& cw = pdsch.codewords.emplace_back();
442 cw.new_data = is_new_data;
443 cw.rv_index = dci_cfg.redundancy_version;
444 cw.mcs_index = dci_cfg.modulation_coding_scheme;
445 cw.mcs_table = pdsch_cfg.mcs_table;
446 cw.mcs_descr = pdsch_mcs_get_config(pdsch_cfg.mcs_table, cw.mcs_index);
447 cw.tb_size_bytes = tbs_bytes;
448}

◆ build_pdsch_f1_1_c_rnti()

void srsran::build_pdsch_f1_1_c_rnti ( pdsch_information & pdsch,
const pdsch_config_params & pdsch_cfg,
sch_mcs_tbs mcs_tbs_info,
rnti_t rnti,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
const dci_1_1_configuration & dci_cfg,
const crb_interval & crbs,
const dl_harq_process & h_dl,
const ue_channel_state_manager & cs_mgr )

Builds PDSCH PDU for DCI format 1_1, scrambled by C-RNTI.

511{
512 const cell_configuration& cell_cfg = ue_cell_cfg.cell_cfg_common;
513 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
514 const coreset_configuration& cs_cfg = *ss_info.coreset;
515 const bwp_info& active_bwp = *ss_info.bwp;
516 const bwp_configuration& active_bwp_cfg = active_bwp.dl_common->generic_params;
517 const prb_interval prbs = crb_to_prb(active_bwp_cfg.crbs, crbs);
518
519 pdsch.rnti = rnti;
520 pdsch.bwp_cfg = &active_bwp_cfg;
521 pdsch.coreset_cfg = &cs_cfg;
522
523 pdsch.rbs = vrb_interval{prbs.start(), prbs.stop()};
524 pdsch.symbols = pdsch_cfg.symbols;
525 pdsch.dmrs = pdsch_cfg.dmrs;
526 pdsch.is_interleaved = dci_cfg.vrb_prb_mapping.has_value();
527 // See TS38.213, 10.1.
528 pdsch.ss_set_type = search_space_set_type::ue_specific;
529 pdsch.dci_fmt = dci_dl_format::f1_1;
530 pdsch.harq_id = to_harq_id(dci_cfg.harq_process_number);
531 // See TS 38.211, 7.3.1.1. - Scrambling.
532 pdsch.n_id =
533 get_pdsch_n_id(cell_cfg.pci, active_bwp.dl_ded, dci_dl_format::f1_1, ss_info.cfg->is_common_search_space());
534 pdsch.nof_layers = pdsch_cfg.nof_layers;
535
536 // TODO: Add second Codeword when supported.
537 // One Codeword.
538 pdsch_codeword& cw = pdsch.codewords.emplace_back();
539 cw.new_data = h_dl.tb(0).nof_retxs == 0;
540 cw.rv_index = dci_cfg.tb1_redundancy_version;
541 cw.mcs_index = dci_cfg.tb1_modulation_coding_scheme;
542 cw.mcs_table = pdsch_cfg.mcs_table;
543 cw.mcs_descr = pdsch_mcs_get_config(pdsch_cfg.mcs_table, cw.mcs_index);
545
546 // Beamforming and precoding.
547 pdsch.precoding = cs_mgr.get_precoding(pdsch_cfg.nof_layers, prbs);
548}
optional< pdsch_precoding_info > precoding
Precoding information for the PDSCH. This field is empty in case of 1-antenna port setups.
Definition scheduler_slot_handler.h:185

◆ build_pusch_f0_0_c_rnti()

void srsran::build_pusch_f0_0_c_rnti ( pusch_information & pusch,
rnti_t rnti,
const pusch_config_params & pusch_cfg,
unsigned tbs_bytes,
const cell_configuration & cell_cfg,
const bwp_uplink_common & ul_bwp,
const dci_0_0_c_rnti_configuration & dci_cfg,
const crb_interval & crbs,
bool is_new_data )

Builds PUSCH PDU for DCI format 0_0, scrambled by C-RNTI.

606{
607 // TODO.
608 pusch.intra_slot_freq_hopping = false;
609 pusch.pusch_second_hop_prb = 0;
611 dc_offset_helper::pack(cell_cfg.expert_cfg.ue.initial_ul_dc_offset, cell_cfg.nof_ul_prbs);
612 pusch.ul_freq_shift_7p5khz = false;
613 pusch.dmrs_hopping_mode = pusch_information::dmrs_hopping_mode::no_hopping;
614
615 pusch.rnti = rnti;
616
617 // PUSCH resources.
618 pusch.bwp_cfg = &ul_bwp.generic_params;
619 const prb_interval prbs = crb_to_prb(ul_bwp.generic_params.crbs, crbs);
620 pusch.rbs = vrb_interval{prbs.start(), prbs.stop()};
621 pusch.symbols = pusch_cfg.symbols;
622
623 // MCS.
624 pusch.mcs_table = pusch_cfg.mcs_table;
625 pusch.mcs_index = dci_cfg.modulation_coding_scheme;
626 pusch.mcs_descr = pusch_mcs_get_config(pusch.mcs_table, pusch.mcs_index, pusch_cfg.tp_pi2bpsk_present);
627
628 pusch.transform_precoding = cell_cfg.ul_cfg_common.init_ul_bwp.rach_cfg_common->msg3_transform_precoder;
629 pusch.n_id = cell_cfg.pci;
630 pusch.dmrs = pusch_cfg.dmrs;
631 pusch.pusch_dmrs_id = cell_cfg.pci;
632
633 // TBS.
634 pusch.nof_layers = pusch_cfg.nof_layers;
635 pusch.tb_size_bytes = tbs_bytes;
636 pusch.num_cb = 0;
637
638 // HARQ.
639 pusch.rv_index = dci_cfg.redundancy_version;
640 pusch.harq_id = dci_cfg.harq_process_number;
641 pusch.new_data = is_new_data;
642}
sch_mcs_description pusch_mcs_get_config(pusch_mcs_table table, sch_mcs_index index, bool tp_pi2bpsk_present)
Gets the Modulation and Coding Scheme configuration for PUSCH.
Definition pusch_mcs.cpp:29
uint32_t tb_size_bytes
Transport block size in bytes.
Definition scheduler_slot_handler.h:281
sch_mcs_index mcs_index
MCS index, range {0, ..., 31} (See TS38.214 Section 5.1.4.1).
Definition scheduler_slot_handler.h:255
bool intra_slot_freq_hopping
For resource allocation type 1, it indicates if intra-slot frequency hopping is enabled,...
Definition scheduler_slot_handler.h:240
bool ul_freq_shift_7p5khz
Indicates whether there is 7.5 kHz shift or not.
Definition scheduler_slot_handler.h:250
bool transform_precoding
Indicates if transform precoding is enabled or disabled (see TS 38.214, Section 6....
Definition scheduler_slot_handler.h:259
uint8_t harq_id
HARQ process number as per TS38.212 Section 6.3.1.1. Values: {0,...,15}.
Definition scheduler_slot_handler.h:275
uint16_t pusch_second_hop_prb
Index of the first PRB after intra-slot frequency hopping, as indicated by the value of for i=1,...
Definition scheduler_slot_handler.h:243
sch_mcs_description mcs_descr
Modulation and coding scheme.
Definition scheduler_slot_handler.h:252
dmrs_hopping_mode
PUSCH DMRS hopping mode as per TS38.211, Section 6.4.1.1.1.2. It is only valid when the transform pre...
Definition scheduler_slot_handler.h:271
uint16_t num_cb
Number of CBs in the TB (could be more than the number of CBs in this PUSCH transmission)....
Definition scheduler_slot_handler.h:285
bool new_data
Signals whether the PUSCH PDU corresponds to an initial transmission or a retransmission of a MAC PDU...
Definition scheduler_slot_handler.h:279
pusch_mcs_table mcs_table
MCS table (See TS38.214 Section 6.1.4.1).
Definition scheduler_slot_handler.h:257
unsigned nof_layers
Number of layers as per TS38.211, Section 6.3.1.3.
Definition scheduler_slot_handler.h:263
uint16_t n_id
Parameter as per TS38.211 Section 6.3.1.1. Values: {0,...,1023}.
Definition scheduler_slot_handler.h:261
uint8_t rv_index
Redundancy version index (see TS38.214 Table 6.1.4). Values: {0,...,3}.
Definition scheduler_slot_handler.h:273
uint16_t pusch_dmrs_id
PUSCH DMRS ID as per TS38.211 Section 6.4.1.1.1.2. This field is only valid when transform_precoding...
Definition scheduler_slot_handler.h:268
dmrs_information dmrs
DMRS configuration as per TS38.211 Section 6.4.1.1.
Definition scheduler_slot_handler.h:265
uint16_t tx_direct_current_location
The uplink Tx Direct Current location for the carrier. Only values in the value range of this field b...
Definition scheduler_slot_handler.h:248
dc_offset_t initial_ul_dc_offset
Definition scheduler_expert_config.h:69

◆ build_pusch_f0_0_tc_rnti()

void srsran::build_pusch_f0_0_tc_rnti ( pusch_information & pusch,
const pusch_config_params & pusch_cfg,
unsigned tbs_bytes,
rnti_t rnti,
const cell_configuration & cell_cfg,
const dci_0_0_tc_rnti_configuration & dci_cfg,
const crb_interval & crbs,
bool is_new_data )

Builds PUSCH PDU for DCI format 0_0, scrambled by TC-RNTI.

558{ // TODO.
559 pusch.intra_slot_freq_hopping = false;
560 pusch.pusch_second_hop_prb = 0;
562 dc_offset_helper::pack(cell_cfg.expert_cfg.ue.initial_ul_dc_offset, cell_cfg.nof_ul_prbs);
563 pusch.ul_freq_shift_7p5khz = false;
564 pusch.dmrs_hopping_mode = pusch_information::dmrs_hopping_mode::no_hopping;
565
566 pusch.rnti = rnti;
567
568 // PUSCH resources.
569 pusch.bwp_cfg = &cell_cfg.ul_cfg_common.init_ul_bwp.generic_params;
570 const prb_interval prbs = crb_to_prb(pusch.bwp_cfg->crbs, crbs);
571 pusch.rbs = vrb_interval{prbs.start(), prbs.stop()};
572 pusch.symbols = pusch_cfg.symbols;
573
574 // MCS.
575 pusch.mcs_table = pusch_cfg.mcs_table;
576 pusch.mcs_index = dci_cfg.modulation_coding_scheme;
577 pusch.mcs_descr = pusch_mcs_get_config(pusch.mcs_table, pusch.mcs_index, false);
578
579 // TS 38.214, 6.1.3. - "transform precoding either 'enabled' or 'disabled' according to the higher layer configured
580 // parameter msg3-transformPrecoder".
581 pusch.transform_precoding = cell_cfg.ul_cfg_common.init_ul_bwp.rach_cfg_common->msg3_transform_precoder;
582 // As per TS 38.211, Section 6.3.1.1, n_ID is set to Physical Cell ID for TC-RNTI.
583 pusch.n_id = cell_cfg.pci;
584 pusch.nof_layers = pusch_cfg.nof_layers;
585 pusch.dmrs = pusch_cfg.dmrs;
586 pusch.pusch_dmrs_id = 0;
587 pusch.rv_index = dci_cfg.redundancy_version;
588 // TS 38.321, 5.4.2.1 - "For UL transmission with UL grant in RA Response, HARQ process identifier 0 is used".
589 pusch.harq_id = 0;
590 pusch.new_data = is_new_data;
591
592 pusch.tb_size_bytes = tbs_bytes;
593 // Set number of CB to zero if no CBs are being used.
594 pusch.num_cb = 0;
595}

◆ build_pusch_f0_1_c_rnti()

void srsran::build_pusch_f0_1_c_rnti ( pusch_information & pusch,
rnti_t rnti,
const pusch_config_params & pusch_cfg,
sch_mcs_tbs mcs_tbs_info,
const ue_cell_configuration & ue_cell_cfg,
search_space_id ss_id,
const dci_0_1_configuration & dci_cfg,
const crb_interval & crbs,
const ul_harq_process & h_ul )

Builds PUSCH PDU for DCI format 0_1, scrambled by C-RNTI.

653{
654 const cell_configuration& cell_cfg = ue_cell_cfg.cell_cfg_common;
655 const search_space_info& ss_info = ue_cell_cfg.search_space(ss_id);
656 const bwp_info& bwp_info = *ss_info.bwp;
658 const bwp_uplink_common& bwp_ul_cmn = *bwp_info.ul_common;
661 const prb_interval prbs = crb_to_prb(bwp_ul_cmn.generic_params.crbs, crbs);
662
663 // TODO: Populate based on config.
664 pusch.intra_slot_freq_hopping = false;
665 pusch.pusch_second_hop_prb = 0;
667 dc_offset_helper::pack(cell_cfg.expert_cfg.ue.initial_ul_dc_offset, cell_cfg.nof_ul_prbs);
668 pusch.ul_freq_shift_7p5khz = false;
669 pusch.dmrs_hopping_mode = pusch_information::dmrs_hopping_mode::no_hopping;
670
671 pusch.rnti = rnti;
672
673 // PUSCH resources.
674 pusch.bwp_cfg = &bwp_info.ul_common->generic_params;
675 pusch.rbs = vrb_interval{prbs.start(), prbs.stop()};
676 pusch.symbols = pusch_cfg.symbols;
677
678 // MCS.
679 pusch.mcs_table = pusch_cfg.mcs_table;
680 pusch.mcs_index = dci_cfg.modulation_coding_scheme;
681 pusch.mcs_descr = pusch_mcs_get_config(pusch.mcs_table, pusch.mcs_index, pusch_cfg.tp_pi2bpsk_present);
682
683 pusch.n_id = cell_cfg.pci;
684
685 // Dedicated config overrides previously set value.
686 if (pusch_cfg_ded.has_value()) {
687 pusch.transform_precoding = false;
688 if (pusch_cfg_ded.value().trans_precoder != pusch_config::transform_precoder::not_set) {
689 pusch.transform_precoding = pusch_cfg_ded.value().trans_precoder == pusch_config::transform_precoder::enabled;
690 } else if (opt_rach_cfg.has_value()) {
691 pusch.transform_precoding = opt_rach_cfg.value().msg3_transform_precoder;
692 }
693
694 if (pusch_cfg_ded.value().data_scrambling_id_pusch.has_value()) {
695 pusch.n_id = pusch_cfg_ded.value().data_scrambling_id_pusch.value();
696 }
697 }
698
699 pusch.dmrs = pusch_cfg.dmrs;
700 pusch.pusch_dmrs_id = pusch_cfg.dmrs.dmrs_scrambling_id;
701
702 // TBS.
703 pusch.nof_layers = pusch_cfg.nof_layers;
704 pusch.tb_size_bytes = mcs_tbs_info.tbs;
705 // TODO: Set based on CobeBook config.
706 pusch.num_cb = 0;
707
708 // HARQ.
709 pusch.rv_index = dci_cfg.redundancy_version;
710 pusch.harq_id = dci_cfg.harq_process_number;
711 pusch.new_data = h_ul.tb().nof_retxs == 0;
712}
Optional objects.
Definition optional.h:281
unsigned dmrs_scrambling_id
DMRS-Scrambling-ID (see TS 38.211 sec 7.4.1.1.1) as provided by parameter . Values: (0....
Definition scheduler_slot_handler.h:81

◆ byte_buffer_segment_pool_default_segment_size()

size_t srsran::byte_buffer_segment_pool_default_segment_size ( )

Default byte buffer segment size in the byte buffer pool.

29{
30 return 2048;
31}

◆ bytes_to_mcc()

bool srsran::bytes_to_mcc ( const uint8_t * bytes,
uint16_t * mcc )
inline

Convert between array of bytes and BCD-coded MCC. Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xf. MCC 001 results in 0xf001

66{
67 *mcc = 0xf000;
68 *mcc |= (((uint16_t)bytes[0]) << 8u);
69 *mcc |= (((uint16_t)bytes[1]) << 4u);
70 *mcc |= (uint16_t)bytes[2];
71 return true;
72}
Definition format.h:3310

◆ bytes_to_mnc()

bool srsran::bytes_to_mnc ( const uint8_t * bytes,
uint16_t * mnc,
uint8_t len )
inline

Convert between array of bytes and BCD-coded MNC. Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xf. MNC 001 results in 0xf001 MNC 01 results in 0xff01

146{
147 if (len != 3 && len != 2) {
148 *mnc = 0;
149 return false;
150 } else if (len == 3) {
151 *mnc = 0xf000;
152 *mnc |= ((uint16_t)bytes[0]) << 8u;
153 *mnc |= ((uint16_t)bytes[1]) << 4u;
154 *mnc |= ((uint16_t)bytes[2]) << 0u;
155 } else if (len == 2) {
156 *mnc = 0xff00;
157 *mnc |= ((uint16_t)bytes[0]) << 4u;
158 *mnc |= ((uint16_t)bytes[1]) << 0u;
159 }
160 return true;
161}

◆ calculate_addmodremlist_diff() [1/3]

std::enable_if_t< not is_iterable< AddFunctor >::value > srsran::calculate_addmodremlist_diff ( const RemFunctor & rem_func,
const AddFunctor & add_func,
const ModFunctor & mod_func,
const List & prev_list,
const List & next_list,
const GetId & id_func )

Invokes rem_func, add_func and mod_func for any detected differences between prev_list and next_list.

Parameters
rem_funcCallable with signature void(const obj_type&), where obj_type is the value_type of List, which gets called for every object whose id exists in prev_list but does not exist in next_list.
add_funcCallable with signature void(const obj_type&), where obj_type is the value_type of List, which gets called for every object whose id exists in next_list but does not exist in prev_list.
mod_funcCallable with signature void(const obj_type&), where obj_type is the value_type of List, which gets called for every object whose id exists in both next_list and prev_list, but its parameters are different between the two lists.
Template Parameters
ListList of objects, where each object has an ID.
GetIdFunction to obtain ID of an object.
Parameters
[in]prev_listPrevious list of objects.
[in]next_listNext list of objects.
[in]id_funcfunction to extract the ID from an object with type equal to the value_type of List.
142{
143 auto id_cmp_op = make_id_comparator(id_func);
144 srsran_sanity_check(std::is_sorted(prev_list.begin(), prev_list.end(), id_cmp_op), "Expected sorted list");
145 srsran_sanity_check(std::is_sorted(next_list.begin(), next_list.end(), id_cmp_op), "Expected sorted list");
146
147 auto src_it = prev_list.begin();
148 auto target_it = next_list.begin();
149
150 bool src_left = src_it != prev_list.end();
151 bool target_left = target_it != next_list.end();
152 while (src_left or target_left) {
153 if (not target_left or (src_left and id_cmp_op(*src_it, *target_it))) {
154 rem_func(src_it++);
155 } else if (not src_left or (target_left and id_cmp_op(*target_it, *src_it))) {
156 // a new object has been added to target
157 add_func(target_it++);
158 } else {
159 mod_func(src_it++, target_it++);
160 }
161 src_left = src_it != prev_list.end();
162 target_left = target_it != next_list.end();
163 }
164}

◆ calculate_addmodremlist_diff() [2/3]

std::enable_if_t< is_iterable< toAddModList >::value > srsran::calculate_addmodremlist_diff ( toAddModList & add_diff_list,
RemoveList & rem_diff_list,
const List & prev_list,
const List & next_list,
const ConvertElem & convert_func,
const GetId & id_func )

Generate toAddModList and toReleaseList based on differences between prev_list and next_list.

Template Parameters
toAddModListList of objects added or modified.
RemoveListList of IDs for objects removed.
ListList of objects, where each object has an ID.
ConvertElemFunction to convert element of List to element of toAddModList.
GetIdFunction to obtain ID of an object.
Parameters
[out]add_diff_listDifference in terms of added/modified objects between prev_list and next_list.
[out]rem_diff_listDifference in terms of removed objects between prev_list and next_list.
[in]prev_listPrevious list of objects.
[in]next_listNext list of objects.
[in]convert_funcCallable used to convert an object with type List::value_type into an object with type toAddModList::value_type.
[in]id_funcfunction to extract the ID from an object with type equal to the value_type of List.
186{
187 if (&prev_list == &next_list) {
188 // No difference because src and target are the same list. Early return.
189 add_diff_list.clear();
190 rem_diff_list.clear();
191 return;
192 }
193
194 add_diff_list.clear();
195 rem_diff_list.clear();
196
197 using it_t = typename List::const_iterator;
198 auto rem_func = [&rem_diff_list, &id_func](it_t rem_it) { rem_diff_list.push_back(id_func(*rem_it)); };
199 auto add_func = [&add_diff_list, &convert_func](it_t add_it) { add_diff_list.push_back(convert_func(*add_it)); };
200 auto mod_func = [&add_diff_list, &convert_func](it_t src_it, it_t target_it) {
201 if (not(*src_it == *target_it)) {
202 add_diff_list.push_back(convert_func(*target_it));
203 }
204 };
205 calculate_addmodremlist_diff(rem_func, add_func, mod_func, prev_list, next_list, id_func);
206}
std::enable_if_t< not is_iterable< AddFunctor >::value > calculate_addmodremlist_diff(const RemFunctor &rem_func, const AddFunctor &add_func, const ModFunctor &mod_func, const List &prev_list, const List &next_list, const GetId &id_func)
Invokes rem_func, add_func and mod_func for any detected differences between prev_list and next_list.
Definition asn1_diff_utils.h:136

◆ calculate_addmodremlist_diff() [3/3]

void srsran::calculate_addmodremlist_diff ( toAddModList & add_diff_list,
RemoveList & rem_diff_list,
const toAddModList & prev_list,
const toAddModList & next_list,
const GetId & id_func )

Generate toAddModList and toReleaseList based on differences between prev_list and next_list.

Template Parameters
toAddModListList of objects added or modified.
RemoveListList of IDs for objects removed.
GetIdFunction to obtain ID of an object.
Parameters
[out]add_diff_listDifference in terms of added/modified objects between prev_list and next_list.
[out]rem_diff_listDifference in terms of removed objects between prev_list and next_list.
[in]prev_listPrevious list of objects.
[in]next_listNext list of objects.
[in]id_funcfunction to extract the ID from an object with type equal to the value_type of List.
223{
224 using elem_type = decltype(*prev_list.begin());
225
226 if (&prev_list == &add_diff_list) {
227 // use const prev_list instead.
228 toAddModList prev_list2 = prev_list;
229 calculate_addmodremlist_diff(add_diff_list, rem_diff_list, prev_list2, next_list, id_func);
230 return;
231 }
232
233 if (&next_list == &add_diff_list) {
234 // use const next_list
235 toAddModList next_list2 = next_list;
236 calculate_addmodremlist_diff(add_diff_list, rem_diff_list, prev_list, next_list2, id_func);
237 return;
238 }
239
241 add_diff_list, rem_diff_list, prev_list, next_list, [](const elem_type& e) { return e; }, id_func);
242}

◆ calculate_nof_dmrs_per_rb()

unsigned srsran::calculate_nof_dmrs_per_rb ( const dmrs_information & dmrs)
inline

Calculates the number of RE used for DMRS per RB in PDSCH and PUSCH transmissions.

37{
38 // Calculate number of RE for DMRS per RB, symbol and CDM group.
39 unsigned nof_dmrs_re = get_nof_re_per_prb(dmrs.config_type);
40
41 // Calculate the maximum number of CDM groups without data and make sure the number does not exceed the maximum.
42 unsigned max_nof_cdm_groups_without_data = get_max_nof_cdm_groups_without_data(dmrs.config_type);
43 srsran_assert(dmrs.num_dmrs_cdm_grps_no_data >= 1 &&
44 dmrs.num_dmrs_cdm_grps_no_data <= max_nof_cdm_groups_without_data,
45 "Invalid number of CDM groups without data {}.",
47
48 // Determines the number of RE for DMRS per RB.
49 return nof_dmrs_re * dmrs.num_dmrs_cdm_grps_no_data * dmrs.dmrs_symb_pos.count();
50}
size_t count() const noexcept
Counts the number of bits set to 1.
Definition bounded_bitset.h:905
uint8_t num_dmrs_cdm_grps_no_data
Values: (1..3).
Definition scheduler_slot_handler.h:90
dmrs_symbol_mask dmrs_symb_pos
Bitmap of DM-RS position symbols.
Definition scheduler_slot_handler.h:77

◆ calculate_setup_release()

bool srsran::calculate_setup_release ( asn1::setup_release_c< Asn1Type > & setup_rel,
const optional< OptionalElem > & prev,
const optional< OptionalElem > & next,
const ConvertElem & convert_func )

Sets up the setup/release ASN.1 object based on the difference between prev and next.

Parameters
setup_relSetup/release ASN.1 object.
prevPrevious optional value.
nextNew optional value.
Template Parameters
ConvertElemFunction to convert element of OptionalElem to element of Asn1Type.
Returns
Whether changes were made to Setup/Release ASN.1 object.
256{
257 if (next.has_value()) {
258 if (not prev.has_value() or *prev != *next) {
259 setup_rel.set_setup() = convert_func(*next);
260 }
261 } else if (prev.has_value()) {
262 setup_rel.set_release();
263 } else {
264 setup_rel.set(asn1::setup_release_opts::nulltype);
265 }
266 return setup_rel.type().value != asn1::setup_release_opts::nulltype;
267}

◆ cardinality()

constexpr uint32_t srsran::cardinality ( uint16_t sn_size)
constexpr

Returns the value range of the sequence numbers.

Parameters
sn_sizeLength of the sequence number field in bits
Returns
cardinality of sn_size
630{
631 srsran_assert(sn_size < 32, "Cardinality of sn_size={} exceeds return type 'uint32_t'", sn_size);
632 return (1 << sn_size);
633}

◆ cause_to_asn1_cause()

asn1::e1ap::cause_c srsran::cause_to_asn1_cause ( cause_t cause)
inline

Convert cause_t type to E1AP ASN.1 cause.

Parameters
causeThe cause_t type.
Returns
The E1AP ASN.1 cause.
1014{
1015 asn1::e1ap::cause_c e1ap_cause;
1016
1017 if (variant_holds_alternative<cause_radio_network_t>(cause)) {
1018 e1ap_cause.set_radio_network() =
1019 static_cast<asn1::e1ap::cause_radio_network_opts::options>(variant_get<cause_radio_network_t>(cause));
1020 } else if (variant_holds_alternative<cause_transport_t>(cause)) {
1021 e1ap_cause.set_transport() =
1022 static_cast<asn1::e1ap::cause_transport_opts::options>(variant_get<cause_transport_t>(cause));
1023 } else if (variant_holds_alternative<cause_protocol_t>(cause)) {
1024 e1ap_cause.set_protocol() =
1025 static_cast<asn1::e1ap::cause_protocol_opts::options>(variant_get<cause_protocol_t>(cause));
1026 } else if (variant_holds_alternative<cause_misc_t>(cause)) {
1027 e1ap_cause.set_misc() = static_cast<asn1::e1ap::cause_misc_opts::options>(variant_get<cause_misc_t>(cause));
1028 } else {
1029 report_fatal_error("Cannot convert cause to E1AP type");
1030 }
1031
1032 return e1ap_cause;
1033}
void report_fatal_error(const char *reason_fmt, Args &&... args) noexcept
Reports a fatal error and handles the application shutdown. This function is intended to be used for ...
Definition error_handling.h:57
Definition e1ap_ies.h:520

◆ cce_to_prb_mapping_coreset0()

prb_index_list srsran::cce_to_prb_mapping_coreset0 ( unsigned N_coreset0_start,
unsigned N_coreset0_size,
unsigned N_symb_coreset,
pci_t N_id_cell,
unsigned aggregation_level,
unsigned cce_index )

Calculates the PDCCH CCE to PRB mapping for a PDCCH transmission in CORESET0.

Parameters
[in]N_coreset0_startThe lowest RB index of the CORESET0 relative to CRB0 (PointA).
[in]N_coreset0_sizeThe CORESET0 bandwidth in RBs.
[in]N_symb_coresetThe number of symbols for the PDCCH transmission.
[in]N_id_cellPhysical cell identifier.
[in]aggregation_levelNumber of CCE used for the PDCCH transmission.
[in]cce_indexInitial CCE index for the PDCCH transmision.
Returns
A list of the resource blocks used by the PDCCH transmission.
158{
159 // Calculate the REG indexes.
161 cce_to_reg_mapping_interleaved(N_coreset0_size, N_symb_coreset, 6, 2, N_id_cell, aggregation_level, cce_index);
162
163 return reg_to_prb_mapping_coreset0(N_coreset0_start, N_coreset0_size, N_symb_coreset, reg_indexes);
164}
Definition static_vector.h:187

◆ cce_to_prb_mapping_interleaved()

prb_index_list srsran::cce_to_prb_mapping_interleaved ( unsigned N_bwp_start,
const freq_resource_bitmap & freq_resources,
unsigned N_symb_coreset,
unsigned reg_bundle_size,
unsigned interleaver_size,
unsigned shift_index,
unsigned aggregation_level,
unsigned cce_index )

Calculates the PDCCH CCE to PRB mapping for an interleaved PDCCH transmission.

Parameters
[in]N_bwp_startStart of the BWP relative to CRB0 (PointA).
[in]freq_resourcesIndicates the frequency resources active for the CORESET.
[in]N_symb_coresetThe number of symbols for the PDCCH transmission.
[in]reg_bundle_sizeParameter reg-BundleSize.
[in]interleaver_sizeParameter interleaverSize.
[in]shift_indexParameter shiftIndex if available, otherwise $N_{ID}^{cell}$.
[in]aggregation_levelNumber of CCE used for the PDCCH transmission.
[in]cce_indexInitial CCE index for the PDCCH transmision.
Returns
A list of the resource blocks used by the PDCCH transmission.
187{
188 // Calculate the REG indexes.
189 reg_index_list reg_indexes = cce_to_reg_mapping_interleaved(freq_resources.count() * 6,
191 reg_bundle_size,
192 interleaver_size,
193 shift_index,
195 cce_index);
196
197 // Map REG indexes to PRB.
198 return reg_to_prb_mapping_other(N_bwp_start, freq_resources, N_symb_coreset, reg_indexes);
199}

◆ cce_to_prb_mapping_non_interleaved()

prb_index_list srsran::cce_to_prb_mapping_non_interleaved ( unsigned N_bwp_start,
const freq_resource_bitmap & freq_resources,
unsigned N_symb_coreset,
unsigned aggregation_level,
unsigned cce_index )

Calculates the PDCCH CCE to PRB mapping for a non-interleaved PDCCH transmission.

Parameters
[in]N_bwp_startStart of the BWP relative to CRB0 (PointA).
[in]freq_resourcesIndicates the frequency resources active for the CORESET.
[in]N_symb_coresetThe number of symbols for the PDCCH transmission.
[in]aggregation_levelNumber of CCE used for the PDCCH transmission.
[in]cce_indexInitial CCE index for the PDCCH transmision.
Returns
A list of the resource blocks used by the PDCCH transmission.
171{
172 // Calculate the REG indexes.
173 reg_index_list reg_indexes = cce_to_reg_mapping_non_interleaved(aggregation_level, cce_index);
174
175 // Map REG indexes to PRB.
176 return reg_to_prb_mapping_other(N_bwp_start, freq_resources, N_symb_coreset, reg_indexes);
177}

◆ cgi_from_asn1()

nr_cell_global_id_t srsran::cgi_from_asn1 ( const asn1::f1ap::nr_cgi_s & asn1_cgi)

Converts ASN.1 CGI typo into internal struct. It also performs the byte to MCC/MNC conversion.

Parameters
[in]asn1_cgiThe ASN.1 encoded NR-CGI.
Returns
The CGI converted to flat internal struct.
28{
29 nr_cell_global_id_t cgi = {};
30 uint32_t encoded_plmn = asn1_cgi.plmn_id.to_number();
32
33 std::string mcc_string, mnc_string;
34 mcc_to_string(cgi.mcc, &mcc_string);
35 mnc_to_string(cgi.mnc, &mnc_string);
37
38 // Set PLMN hex string
39 cgi.plmn_hex = asn1_cgi.plmn_id.to_string();
40
41 cgi.nci = asn1_cgi.nr_cell_id.to_number();
42
43 return cgi;
44}
void ngap_plmn_to_mccmnc(uint32_t plmn, uint16_t *mcc, uint16_t *mnc)
Definition bcd_helpers.h:212
The NR Cell Global Identity (NR-CGI)
Definition nr_cgi.h:37
uint16_t mcc
3 digits mobile country code (BCD encoded).
Definition nr_cgi.h:45
uint16_t mnc
2 or 3 digits mobile network code (BCD encoded).
Definition nr_cgi.h:47
nr_cell_id_t nci
NR cell id.
Definition nr_cgi.h:53
std::string plmn
Full PLMN as string (without possible filler digit).
Definition nr_cgi.h:49
std::string plmn_hex
Full PLMN as hex string with filler digit if needed.
Definition nr_cgi.h:51

◆ channel_bw_mhz_to_index_fr1()

constexpr std::size_t srsran::channel_bw_mhz_to_index_fr1 ( unsigned dl_bw_mhz)
inlineconstexpr

Converts channel bandwidth in MHz to index.

45{
46 switch (dl_bw_mhz) {
47 case 5:
48 return 0;
49 case 10:
50 return 1;
51 case 15:
52 return 2;
53 case 20:
54 return 3;
55 case 25:
56 return 4;
57 case 30:
58 return 5;
59 case 40:
60 return 6;
61 case 50:
62 return 7;
63 case 60:
64 return 8;
65 case 70:
66 return 9;
67 case 80:
68 return 10;
69 case 90:
70 return 11;
71 case 100:
72 return 12;
73 default:
74 break;
75 }
76 return std::numeric_limits<size_t>::max();
77}

◆ channel_bw_mhz_to_index_fr2()

constexpr std::size_t srsran::channel_bw_mhz_to_index_fr2 ( unsigned dl_bw_mhz)
inlineconstexpr

Converts channel bandwidth in MHz to index.

81{
82 switch (dl_bw_mhz) {
83 case 50:
84 return 0;
85 case 100:
86 return 1;
87 case 200:
88 return 2;
89 case 400:
90 return 3;
91 default:
92 break;
93 }
94 return std::numeric_limits<size_t>::max();
95}

◆ check_bitmap_bit()

template<typename Integer >
bool srsran::check_bitmap_bit ( Integer bitmap,
unsigned bit )

Checks the value of a bit in the bitmap and returns a true if the bit is set, otherwise false.

Parameters
[in]bitmapBitmap to check.
[in]bitBit to check.
Returns
True when the bit equals 1, otherwise false.
Note
Use this function with integer data types, otherwise it produces undefined behaviour.
54{
55 static_assert(std::is_integral<Integer>::value, "Integral required");
56 srsran_assert(sizeof(bitmap) * 8 > bit, "Requested bit ({}), exceeds the bitmap size({})", bit, sizeof(bitmap) * 8);
57
58 return (bitmap & (1U << bit));
59}

◆ check_cpu_governor()

bool srsran::check_cpu_governor ( srslog::basic_logger & logger)

Check whether the CPU scaling governor is set to performance.

Parameters
[in]loggerto print warnings.
Returns
True if we were able to read the sysfs scaling governor information.
194{
195 unsigned int n_cpus = std::thread::hardware_concurrency();
196 std::string filename_base = "/sys/devices/system/cpu/cpu";
197 for (unsigned int i = 0; i < n_cpus; ++i) {
198 std::string filename = filename_base + std::to_string(i) + "/cpufreq/scaling_governor";
199 std::ifstream input(filename);
200 if (input.fail()) {
201 logger.warning("Could not check scaling governor. filename={} error=\"{}\"", filename, strerror(errno));
202 return false;
203 }
204 std::string gov;
205 std::getline(input, gov);
206 if (input.fail()) {
207 logger.warning("Could not check scaling governor. filename={} error=\"{}\"", filename, strerror(errno));
208 return false;
209 }
210 if (gov == "performance") {
211 logger.debug("CPU{} scaling governor is set to performance", i);
212 } else {
213 logger.warning(
214 "CPU{} scaling governor is not set to performance, which may hinder performance. You can set it to "
215 "performance using the "
216 "\"srsran_performance\" script",
217 i);
218 }
219 }
220 return true;
221}

◆ check_drm_kms_polling()

bool srsran::check_drm_kms_polling ( srslog::basic_logger & logger)

Check whether the DRM KMS polling is set.

Parameters
[in]loggerto print warnings.
Returns
True if we were able to read the sysfs for the DRM KMS polling information.
224{
225 std::string filename = "/sys/module/drm_kms_helper/parameters/poll";
226 std::ifstream input(filename);
227 if (input.fail()) {
228 logger.warning("Could not check DRM KMS polling. filename={} error=\"{}\"", filename, strerror(errno));
229 return false;
230 }
231 std::string polling;
232 std::getline(input, polling);
233 if (input.fail()) {
234 logger.warning("Could not check DRM KMS polling. filename={} error=\"{}\"", filename, strerror(errno));
235 return false;
236 }
237 if (polling == "N") {
238 logger.debug("DRM KMS polling is disabled");
239 } else {
240 logger.warning("DRM KMS polling is enabled, which may hinder performance. You can disable it using the "
241 "\"srsran_performance\" script");
242 }
243 return true;
244}

◆ ciphering_algorithm_to_e1ap_asn1()

asn1::e1ap::ciphering_algorithm_e srsran::ciphering_algorithm_to_e1ap_asn1 ( const srsran::security::ciphering_algorithm & ciph_algo)
inline

Converts type ciphering_algorithm to an E1AP ASN.1 type.

Parameters
[in]ciph_algoCyphering Algorithm object.
Returns
The E1AP ASN.1 object where the result of the conversion is stored.
46{
48
49 switch (ciph_algo) {
50 case srsran::security::ciphering_algorithm::nea0:
51 asn1_ciph_algo = asn1::e1ap::ciphering_algorithm_opts::nea0;
52 break;
53 case srsran::security::ciphering_algorithm::nea1:
54 asn1_ciph_algo = asn1::e1ap::ciphering_algorithm_opts::c_neg128_nea1;
55 break;
56 case srsran::security::ciphering_algorithm::nea2:
57 asn1_ciph_algo = asn1::e1ap::ciphering_algorithm_opts::c_neg128_nea2;
58 break;
59 case srsran::security::ciphering_algorithm::nea3:
60 asn1_ciph_algo = asn1::e1ap::ciphering_algorithm_opts::c_neg128_nea3;
61 break;
62 default:
63 srsran_assert(false, "Invalid ciphering algorithm ({})", ciph_algo);
64 break;
65 }
66
67 return asn1_ciph_algo;
68}

◆ clamp() [1/2]

template<class T >
constexpr const T & srsran::clamp ( const T & value,
const T & lower_bound,
const T & upper_bound )
constexpr

Ensures a value is between the given bounds, according to the default order relation.

See the documentation for the extended form for more information.

197{
198 return clamp(value, lower_bound, upper_bound, std::less<T>());
199}
constexpr const T & clamp(const T &value, const T &lower_bound, const T &upper_bound, CompareLess comp)
Ensures a value is between the given bounds, according to a specified order relation.
Definition math_utils.h:187

◆ clamp() [2/2]

template<class T , class CompareLess >
constexpr const T & srsran::clamp ( const T & value,
const T & lower_bound,
const T & upper_bound,
CompareLess comp )
constexpr

Ensures a value is between the given bounds, according to a specified order relation.

Template Parameters
TClass of the value to clamp. A strict order relation (less than) should be definable between elements of class T.
CompareLessClass of the comparison object (see below).
Parameters
valueThe value to clamp.
lower_boundMinimum value after clamping.
upper_boundMaximum value after clamping.
compComparison function object implementing an order relation between elements of T. The signature should be equivalent to bool comp(const T& a, const T& b) and should return true if a < b (according to any order relation in T), false otherwise.
Returns
A reference to lower_bound if value < lower_bound; a reference to upper_bound if upper_bound < value; a reference to value itself otherwise.
188{
189 return comp(value, lower_bound) ? lower_bound : (comp(upper_bound, value) ? upper_bound : value);
190}

◆ cleanup_cgroups()

void srsran::cleanup_cgroups ( )

Removes cgroups created by the gNB app.

157{
158 using namespace std::chrono_literals;
159
160 bool cgroup_changed = false;
161 std::string isolated_cgroup_path = "/sys/fs/cgroup/isolated";
162 std::string housekeeping_cgroup_path = "/sys/fs/cgroup/housekeeping";
163 std::string root_cgroup_path = "/sys/fs/cgroup/cgroup.procs";
164
165 struct stat sysfs_info;
166 if (::stat("/sys/fs/cgroup", &sysfs_info) < 0) {
167 return;
168 }
169
170 struct stat info;
171 if (::stat(housekeeping_cgroup_path.c_str(), &info) == 0) {
172 move_procs_between_cgroups(root_cgroup_path, housekeeping_cgroup_path + "/cgroup.procs");
173 // Remove previously created cgroups.
174 if (::rmdir(housekeeping_cgroup_path.c_str()) < 0) {
175 fmt::print("Could not delete {}. error=\"{}\"\n", housekeeping_cgroup_path, strerror(errno));
176 }
177 cgroup_changed = true;
178 }
179 if (::stat(isolated_cgroup_path.c_str(), &info) == 0) {
180 // Move all processes to the parent cgroup.
181 move_procs_between_cgroups(root_cgroup_path, isolated_cgroup_path + "/cgroup.procs");
182 if (::rmdir(isolated_cgroup_path.c_str())) {
183 fmt::print("Could not delete {}. error=\"{}\"\n", isolated_cgroup_path, strerror(errno));
184 }
185 cgroup_changed = true;
186 }
187 // Wait for changes in cpuset to take place.
188 if (cgroup_changed) {
189 std::this_thread::sleep_for(100ms);
190 }
191}

◆ close_trace_file()

void srsran::close_trace_file ( )

Close the trace file. This function is called automatically when the program exits.

153{
154 trace_file_writer = nullptr;
155}

◆ compute_dl_mcs_tbs()

optional< sch_mcs_tbs > srsran::compute_dl_mcs_tbs ( const pdsch_config_params & pdsch_params,
const ue_cell_configuration & ue_cell_cfg,
sch_mcs_index max_mcs,
unsigned nof_prbs )

Computes the PDSCH MCS and TBS such that the effective code rate does not exceed 0.95.

Parameters
[in]pdsch_paramsPDSCH parameters needed to compute the MCS and TBS.
[in]ue_cell_cfgUE cell configuration.
[in]max_mcsInitial value to be applied for the MCS; the final MCS might be lowered if the effective code rate is above 0.95.
[in]nof_prbsMaximum number of PRBs available for the PUSCH transmission.
Returns
The MCS and TBS, if for these values the effective code rate does not exceed 0.95; else, it returns an empty optional object.
166{
167 // The maximum supported code rate is 0.95, as per TS38.214, Section 5.1.3. The maximum code rate is defined for DL,
168 // but we consider the same value for UL.
169 static const double max_supported_code_rate = 0.95;
170 const unsigned dmrs_prbs = calculate_nof_dmrs_per_rb(pdsch_params.dmrs);
172 unsigned nof_symbols = pdsch_params.symbols.length();
173
174 unsigned tbs_bits =
176 .nof_dmrs_prb = dmrs_prbs,
177 .nof_oh_prb = pdsch_params.nof_oh_prb,
178 .mcs_descr = mcs_info,
179 .nof_layers = pdsch_params.nof_layers,
180 .tb_scaling_field = pdsch_params.tb_scaling_field,
181 .n_prb = nof_prbs});
182
183 // > Compute the effective code rate.
185 .mcs_descr = mcs_info,
186 .nof_rb = nof_prbs,
187 .start_symbol_index = pdsch_params.symbols.start(),
188 .nof_symbols = static_cast<unsigned>(pdsch_params.symbols.length()),
189 .dmrs_type = pdsch_params.dmrs.config_type,
190 .dmrs_symbol_mask = pdsch_params.dmrs.dmrs_symb_pos,
191 .nof_cdm_groups_without_data =
192 static_cast<unsigned>(pdsch_params.dmrs.num_dmrs_cdm_grps_no_data),
193 .nof_layers = pdsch_params.nof_layers};
194
196
197 // > Decrease the MCS and recompute TBS until the effective code rate is not above the 0.95 threshold.
200 --mcs;
203 .nof_dmrs_prb = dmrs_prbs,
204 .nof_oh_prb = pdsch_params.nof_oh_prb,
205 .mcs_descr = mcs_info,
206 .nof_layers = pdsch_params.nof_layers,
207 .tb_scaling_field = pdsch_params.tb_scaling_field,
208 .n_prb = nof_prbs});
209
210 dlsch_info.tbs = static_cast<units::bits>(tbs_bits);
211 dlsch_info.mcs_descr = mcs_info;
213 }
214
215 // If no MCS such that effective code rate <= 0.95, return an empty optional object.
217 return nullopt;
218 }
219
220 const unsigned tbs_bytes = tbs_bits / NOF_BITS_PER_BYTE;
221 return optional<sch_mcs_tbs>{sch_mcs_tbs{.mcs = mcs, .tbs = tbs_bytes}};
222}
Defines the DMRS for PDSCH and PUSCH types.
Definition dmrs_mapping.h:31
Abstraction of bit as a unit of digital information.
Definition units.h:57
constexpr nullopt_t nullopt
Initializer for empty optional objects.
Definition optional.h:39
unsigned tbs_calculator_calculate(const tbs_calculator_configuration &config)
Calculates the TBS for a given SCH transmission.
Definition tbs_calculator.cpp:124
dlsch_information get_dlsch_information(const dlsch_configuration &config)
Gets the DL-SCH information for a given PDSCH configuration.
Definition dlsch_info.cpp:28
unsigned calculate_nof_dmrs_per_rb(const dmrs_information &dmrs)
Calculates the number of RE used for DMRS per RB in PDSCH and PUSCH transmissions.
Definition dmrs_helpers.h:36
Collects the necessary parameters to calculate the Downlink Shared Channel (DL-SCH) information.
Definition dlsch_info.h:36
units::bits tbs
Transport block size.
Definition dlsch_info.h:38
float get_effective_code_rate() const
Calculates the effective code rate normalized between 0 and 1.
Definition dlsch_info.h:68
Physical Downlink and Uplink Shared Channel Modulation and Coding Scheme breakdown.
Definition sch_mcs.h:37
Container for MCS and TBS results.
Definition mcs_tbs_calculator.h:36
sch_mcs_index mcs
MCS to use for the UE's PDSCH and PUSCH.
Definition mcs_tbs_calculator.h:38
Collection of parameters required to calculate the TBS for a shared channel transmission.
Definition tbs_calculator.h:38
unsigned nof_symb_sh
Number of OFDM symbols allocated to the SCH within the slot.
Definition tbs_calculator.h:42

◆ compute_host_nof_hardware_threads()

size_t srsran::compute_host_nof_hardware_threads ( )

Computes the number of threads that are usable in the given host.

81{
82 return host_desc.nof_cores;
83}

◆ compute_interval_idx()

unsigned srsran::compute_interval_idx ( float value,
float interval_width,
unsigned nof_intervals )
inline

Helper function to calculate an interval index from floating point value.

Parameters
[in]valueInput value.
[in]interval_widthInterval width.
[in]nof_intervalsNumber of intervals.
Returns
Resulting interval index.
35{
36 int nof_intervals_int = static_cast<int>(nof_intervals);
37 int idx = static_cast<int>(std::floor(value / interval_width)) + nof_intervals_int / 2;
38
39 return clamp(idx, 0, nof_intervals_int - 1);
40}

◆ compute_ul_mcs_tbs()

optional< sch_mcs_tbs > srsran::compute_ul_mcs_tbs ( const pusch_config_params & pusch_params,
const ue_cell_configuration & ue_cell_cfg,
sch_mcs_index max_mcs,
unsigned nof_prbs )

Computes the PUSCH MCS and TBS such that the effective code rate does not exceed 0.95.

Parameters
[in]pusch_paramsPUSCH parameters needed to compute the MCS and TBS.
[in]ue_cell_cfgUE cell configuration.
[in]max_mcsInitial value to be applied for the MCS; the final MCS might be lowered if the effective code rate is above 0.95.
[in]nof_prbsMaximum number of PRBs available for the PUSCH transmission.
Returns
The MCS and TBS, if for these values the effective code rate does not exceed 0.95; else, it returns an empty optional object.
228{
229 // The maximum supported code rate is 0.95, as per TS38.214, Section 5.1.3. The maximum code rate is defined for DL,
230 // but we consider the same value for UL.
231 static const double max_supported_code_rate = 0.95;
232 const unsigned dmrs_prbs = calculate_nof_dmrs_per_rb(pusch_cfg.dmrs);
233 sch_mcs_description mcs_info = pusch_mcs_get_config(pusch_cfg.mcs_table, max_mcs, pusch_cfg.tp_pi2bpsk_present);
234 unsigned nof_symbols = pusch_cfg.symbols.length();
235
236 unsigned tbs_bytes =
238 .nof_dmrs_prb = dmrs_prbs,
239 .nof_oh_prb = pusch_cfg.nof_oh_prb,
240 .mcs_descr = mcs_info,
241 .nof_layers = pusch_cfg.nof_layers,
242 .tb_scaling_field = pusch_cfg.tb_scaling_field,
243 .n_prb = nof_prbs}) /
244 NOF_BITS_PER_BYTE;
245
246 // > Compute the effective code rate.
247 ulsch_configuration ulsch_cfg = build_ulsch_info(pusch_cfg, ue_cell_cfg, tbs_bytes, mcs_info, nof_prbs);
249
250 // > Decrease the MCS and recompute TBS until the effective code rate is not above the 0.95 threshold.
253 --mcs;
254 mcs_info = pusch_mcs_get_config(pusch_cfg.mcs_table, mcs, false);
256 .nof_dmrs_prb = dmrs_prbs,
257 .nof_oh_prb = pusch_cfg.nof_oh_prb,
258 .mcs_descr = mcs_info,
259 .nof_layers = pusch_cfg.nof_layers,
260 .tb_scaling_field = pusch_cfg.tb_scaling_field,
261 .n_prb = nof_prbs}) /
262 NOF_BITS_PER_BYTE;
263
264 update_ulsch_info(ulsch_cfg, tbs_bytes, mcs_info);
266 }
267
268 // If no MCS such that effective code rate <= 0.95, return an empty optional object.
270 return nullopt;
271 }
272
273 // If no MCS such that nof bits for PUSCH > 0, return an empty optional object.
274 if (effective_code_rate == 0) {
275 return nullopt;
276 }
277
278 return optional<sch_mcs_tbs>{sch_mcs_tbs{.mcs = mcs, .tbs = tbs_bytes}};
279}
ulsch_information get_ulsch_information(const ulsch_configuration &config)
Gets the UL-SCH information for a given PUSCH configuration.
Definition ulsch_info.cpp:163
Collects the necessary parameters to calculate the Uplink Shared Channel (UL-SCH) information.
Definition ulsch_info.h:39
float get_effective_code_rate() const
Calculates the effective code rate normalized between 0 and 1.
Definition ulsch_info.h:109

◆ configure_cgroups()

bool srsran::configure_cgroups ( const srsran::os_sched_affinity_bitmask & isol_cpus)

Configures cgroups.

Parameters
[in]isol_cpusSet of CPUs to be isolated for the gNB app.
Returns
True if we were able to configure cgroups through the sysfs.

First move itself to root cgroup.

Create cgroup for OS tasks, call it 'housekeeping' cgroup.

Migrate all processes to the default cgroup, that will be using housekeeping cpuset.

Create cgroup with isolated CPUs dedicated for the gNB app.

Finally move itself to isolcated cgroup.

81{
82 std::string isolated_cpus;
83 std::string os_cpus;
84
85 // Create the string with the CPU indexes.
86 for (unsigned pos = 0; pos != isol_cpus.size(); ++pos) {
87 if (isol_cpus.test(pos)) {
88 isolated_cpus += (isolated_cpus.empty()) ? std::to_string(pos) : "," + std::to_string(pos);
89 } else {
90 os_cpus += (os_cpus.empty()) ? std::to_string(pos) : "," + std::to_string(pos);
91 }
92 }
93
94 std::string cgroup_path = "/sys/fs/cgroup";
95 struct stat info;
96 if (::stat(cgroup_path.c_str(), &info) < 0) {
97 fmt::print("Could not find {}, make sure cgroups-v2 is mounted. error=\"{}\"\n", cgroup_path, strerror(errno));
98 return false;
99 }
100
102 move_to_cgroup(cgroup_path);
103
105 if (!os_cpus.empty()) {
106 std::string housekeeping = cgroup_path + "/housekeeping";
107 if ((::mkdir(housekeeping.c_str(), 0755)) < 0 && errno != EEXIST) {
108 fmt::print("Could not create {} directory. error=\"{}\"\n", housekeeping, strerror(errno));
109 return false;
110 }
111 std::string set_cpus_cmd = "echo " + os_cpus + " > " + housekeeping + "/cpuset.cpus";
112 if (!exec_system_command(set_cpus_cmd, housekeeping)) {
113 return false;
114 }
116 std::string procs_filename = housekeeping + "/cgroup.procs";
117 FILE* file = popen("ps -eLo lwp=", "r");
118 if (!file) {
119 fmt::print("Couldn't move system processes to a dedicated cgroup\n");
120 return false;
121 }
122 const size_t len = 32;
123 char pid_buffer[len];
124 while (::fgets(pid_buffer, len, file)) {
125 unsigned pid;
126 std::stringstream ss(pid_buffer);
127 std::ofstream output(procs_filename);
128 if (output.fail()) {
129 fmt::print("Could not open {} directory. error=\"{}\"\n", procs_filename, strerror(errno));
130 return false;
131 }
132 ss >> pid;
133 output << pid << "\n";
134 }
135 ::pclose(file);
136 }
137
139 std::string isol_cgroup_path = cgroup_path + "/isolated";
140 if ((::mkdir(isol_cgroup_path.c_str(), 0755)) < 0 && errno != EEXIST) {
141 fmt::print("Could not create {} directory. error=\"{}\"\n", isol_cgroup_path, strerror(errno));
142 return false;
143 }
144
145 std::string set_cpus_cmd = "echo " + isolated_cpus + " > " + isol_cgroup_path + "/cpuset.cpus";
146 if (!exec_system_command(set_cpus_cmd, isol_cgroup_path)) {
147 return false;
148 }
149
151 move_to_cgroup(isol_cgroup_path);
152
153 return true;
154}

◆ configure_cli11_with_gnb_appconfig_schema()

void srsran::configure_cli11_with_gnb_appconfig_schema ( CLI::App & app,
gnb_parsed_appconfig & gnb_parsed_cfg )

Configures the given CLI11 application with the gNB application configuration schema.

NTN section

2378{
2380 app.add_option("--gnb_id", gnb_cfg.gnb_id, "gNodeB identifier")->capture_default_str();
2381 app.add_option("--gnb_id_bit_length", gnb_cfg.gnb_id_bit_length, "gNodeB identifier length in bits")
2382 ->capture_default_str()
2383 ->check(CLI::Range(22, 32));
2384 app.add_option("--ran_node_name", gnb_cfg.ran_node_name, "RAN node name")->capture_default_str();
2385
2386 // Logging section.
2387 CLI::App* log_subcmd = app.add_subcommand("log", "Logging configuration")->configurable();
2388 configure_cli11_log_args(*log_subcmd, gnb_cfg.log_cfg);
2389
2390 // PCAP section.
2391 CLI::App* pcap_subcmd = app.add_subcommand("pcap", "PCAP configuration")->configurable();
2392 configure_cli11_pcap_args(*pcap_subcmd, gnb_cfg.pcap_cfg);
2393
2394 // Metrics section.
2395 CLI::App* metrics_subcmd = app.add_subcommand("metrics", "Metrics configuration")->configurable();
2396 configure_cli11_metrics_args(*metrics_subcmd, gnb_cfg.metrics_cfg);
2397
2398 // AMF section.
2399 CLI::App* amf_subcmd = app.add_subcommand("amf", "AMF parameters")->configurable();
2400 configure_cli11_amf_args(*amf_subcmd, gnb_cfg.amf_cfg);
2401
2402 // E2 section.
2403 CLI::App* e2_subcmd = app.add_subcommand("e2", "E2 parameters")->configurable();
2404 configure_cli11_e2_args(*e2_subcmd, gnb_cfg.e2_cfg);
2405
2406 // CU-CP section
2407 CLI::App* cu_cp_subcmd = app.add_subcommand("cu_cp", "CU-CP parameters")->configurable();
2408 configure_cli11_cu_cp_args(*cu_cp_subcmd, gnb_cfg.cu_cp_cfg);
2409
2410 // CU-UP section
2411 CLI::App* cu_up_subcmd = app.add_subcommand("cu_up", "CU-CP parameters")->configurable();
2412 configure_cli11_cu_up_args(*cu_up_subcmd, gnb_cfg.cu_up_cfg);
2413
2415 CLI::App* ntn_subcmd = app.add_subcommand("ntn", "NTN parameters")->configurable();
2418 configure_cli11_ntn_args(*ntn_subcmd, gnb_cfg.ntn_cfg, orbital_coordinates, ecef_coordinates);
2419
2420 // NOTE: CLI11 needs that the life of the variable lasts longer than the call of this function. As both options need
2421 // to be added and a variant is used to store the Radio Unit configuration, the configuration is parsed in a helper
2422 // variable, but as it is requested later, the variable needs to be static.
2423 // RU section.
2425 CLI::App* ru_ofh_subcmd = app.add_subcommand("ru_ofh", "Open Fronthaul Radio Unit configuration")->configurable();
2426 configure_cli11_ru_ofh_args(*ru_ofh_subcmd, ofh_cfg);
2427
2429 CLI::App* ru_sdr_subcmd = app.add_subcommand("ru_sdr", "SDR Radio Unit configuration")->configurable();
2430 configure_cli11_ru_sdr_args(*ru_sdr_subcmd, sdr_cfg);
2431
2433 CLI::App* ru_dummy_subcmd = app.add_subcommand("ru_dummy", "Dummy Radio Unit configuration")->configurable();
2434 configure_cli11_ru_dummy_args(*ru_dummy_subcmd, dummy_cfg);
2435
2436 // Common cell parameters.
2437 CLI::App* common_cell_subcmd = app.add_subcommand("cell_cfg", "Default cell configuration")->configurable();
2438 configure_cli11_common_cell_args(*common_cell_subcmd, gnb_parsed_cfg.common_cell_cfg);
2439 // Configure the cells to use the common cell parameters once it has been parsed and before parsing the cells.
2440 common_cell_subcmd->parse_complete_callback([&gnb_parsed_cfg, &app]() {
2441 for (auto& cell : gnb_parsed_cfg.config.cells_cfg) {
2442 cell.cell = gnb_parsed_cfg.common_cell_cfg;
2443 };
2444 // Run the callback again for the cells if the option callback is already run once.
2445 if (app.get_option("--cells")->get_callback_run()) {
2446 app.get_option("--cells")->run_callback();
2447 }
2448 });
2449
2450 // Cell parameters.
2451 app.add_option_function<std::vector<std::string>>(
2452 "--cells",
2453 [&gnb_parsed_cfg](const std::vector<std::string>& values) {
2454 // Resize the number of cells that controls the CPU affinites.
2455 gnb_parsed_cfg.config.expert_execution_cfg.cell_affinities.resize(values.size());
2456 // Prepare the cells from the common cell.
2457 gnb_parsed_cfg.config.cells_cfg.resize(values.size());
2458 for (auto& cell : gnb_parsed_cfg.config.cells_cfg) {
2459 cell.cell = gnb_parsed_cfg.common_cell_cfg;
2460 }
2461
2462 // Format every cell.
2463 for (unsigned i = 0, e = values.size(); i != e; ++i) {
2464 CLI::App subapp("srsGNB application");
2465 subapp.config_formatter(create_yaml_config_parser());
2466 subapp.allow_config_extras(CLI::config_extras_mode::error);
2467 configure_cli11_cells_args(subapp, gnb_parsed_cfg.config.cells_cfg[i]);
2468 std::istringstream ss(values[i]);
2469 subapp.parse_from_stream(ss);
2470 }
2471 },
2472 "Sets the cell configuration on a per cell basis, overwriting the default configuration defined by cell_cfg");
2473
2474 // QoS parameters.
2475 auto qos_lambda = [&gnb_cfg](const std::vector<std::string>& values) {
2476 // Prepare the radio bearers
2477 gnb_cfg.qos_cfg.resize(values.size());
2478
2479 // Format every QoS setting.
2480 for (unsigned i = 0, e = values.size(); i != e; ++i) {
2481 CLI::App subapp("QoS parameters");
2482 subapp.config_formatter(create_yaml_config_parser());
2483 subapp.allow_config_extras(CLI::config_extras_mode::error);
2484 configure_cli11_qos_args(subapp, gnb_cfg.qos_cfg[i]);
2485 std::istringstream ss(values[i]);
2486 subapp.parse_from_stream(ss);
2487 }
2488 };
2489 app.add_option_function<std::vector<std::string>>(
2490 "--qos", qos_lambda, "Configures RLC and PDCP radio bearers on a per 5QI basis.");
2491
2492 // SRB parameters.
2493 auto srb_lambda = [&gnb_cfg](const std::vector<std::string>& values) {
2494 // Format every SRB setting.
2495 for (unsigned i = 0, e = values.size(); i != e; ++i) {
2496 CLI::App subapp("SRB parameters");
2497 subapp.config_formatter(create_yaml_config_parser());
2498 subapp.allow_config_extras(CLI::config_extras_mode::error);
2499 srb_appconfig srb_cfg;
2500 configure_cli11_srb_args(subapp, srb_cfg);
2501 std::istringstream ss(values[i]);
2502 subapp.parse_from_stream(ss);
2503 gnb_cfg.srb_cfg[static_cast<srb_id_t>(srb_cfg.srb_id)] = srb_cfg;
2504 }
2505 };
2506 app.add_option_function<std::vector<std::string>>("--srbs", srb_lambda, "Configures signaling radio bearers.");
2507
2508 // Slicing parameters.
2509 auto slicing_lambda = [&gnb_cfg](const std::vector<std::string>& values) {
2510 // Prepare the radio bearers
2511 gnb_cfg.slice_cfg.resize(values.size());
2512
2513 // Format every QoS setting.
2514 for (unsigned i = 0, e = values.size(); i != e; ++i) {
2515 CLI::App subapp("Slicing parameters");
2516 subapp.config_formatter(create_yaml_config_parser());
2517 subapp.allow_config_extras(CLI::config_extras_mode::error);
2518 configure_cli11_slicing_args(subapp, gnb_cfg.slice_cfg[i]);
2519 std::istringstream ss(values[i]);
2520 subapp.parse_from_stream(ss);
2521 }
2522 };
2523 app.add_option_function<std::vector<std::string>>("--slicing", slicing_lambda, "Network slicing configuration");
2524
2525 // Expert PHY section.
2526 CLI::App* expert_phy_subcmd = app.add_subcommand("expert_phy", "Expert physical layer configuration")->configurable();
2527 configure_cli11_expert_phy_args(*expert_phy_subcmd, gnb_cfg.expert_phy_cfg);
2528
2529 // Buffer pool section.
2530 CLI::App* buffer_pool_subcmd = app.add_subcommand("buffer_pool", "Buffer pool configuration")->configurable();
2531 configure_cli11_buffer_pool_args(*buffer_pool_subcmd, gnb_cfg.buffer_pool_config);
2532
2533 // Test mode section.
2534 CLI::App* test_mode_subcmd = app.add_subcommand("test_mode", "Test mode configuration")->configurable();
2535 configure_cli11_test_mode_args(*test_mode_subcmd, gnb_cfg.test_mode_cfg);
2536
2537 // Expert section.
2538 CLI::App* expert_subcmd = app.add_subcommand("expert_execution", "Expert execution configuration")->configurable();
2539 configure_cli11_expert_execution_args(*expert_subcmd, gnb_cfg.expert_execution_cfg);
2540
2541 CLI::App* hal_subcmd = app.add_subcommand("hal", "HAL configuration")->configurable();
2542 configure_cli11_hal_args(*hal_subcmd, gnb_cfg.hal_config);
2543
2544 app.callback([&]() {
2545 manage_ru_variant(app, gnb_cfg, sdr_cfg, ofh_cfg, dummy_cfg);
2546 manage_hal_optional(app, gnb_cfg);
2547 manage_ntn_optional(app, gnb_cfg, orbital_coordinates, ecef_coordinates);
2548 manage_processing_delay(app, gnb_cfg);
2549 manage_expert_execution_threads(app, gnb_cfg);
2550 });
2551}
std::unique_ptr< CLI::Config > create_yaml_config_parser()
Creates an instance of a YAML configuration parser.
Definition config_yaml.cpp:175
Definition ntn.h:29
Monolithic gnb application configuration.
Definition gnb_appconfig.h:1215
gNB app dummy Radio Unit configuration.
Definition gnb_appconfig.h:1067
gNB app Open Fronthaul Radio Unit configuration.
Definition gnb_appconfig.h:1053
gNB app SDR Radio Unit configuration.
Definition gnb_appconfig.h:936
QoS configuration.
Definition gnb_appconfig.h:625

◆ convert_amplitude_to_dB()

float srsran::convert_amplitude_to_dB ( float value)
inline

Converts a linear amplitude ratio to decibels.

Parameters
[in]valueis the linear amplitude
Returns
the resultant decibels
113{
114 return 20.0F * std::log10(value);
115}

◆ convert_dB_to_amplitude()

float srsran::convert_dB_to_amplitude ( float value)
inline

Converts a value in decibels to linear amplitude ratio.

Parameters
[in]valueis in decibels
Returns
the resultant amplitude ratio
97{
98 return std::pow(10.0F, value / 20.0F);
99}

◆ convert_dB_to_power()

float srsran::convert_dB_to_power ( float value)
inline

Converts a value in decibels to linear power ratio.

Parameters
[in]valueis in decibels
Returns
the resultant power ratio
105{
106 return std::pow(10.0F, value / 10.0F);
107}

◆ convert_power_to_dB()

float srsran::convert_power_to_dB ( float value)
inline

Converts a linear power ratio to decibels.

Parameters
[in]valueis the linear power
Returns
the resultant decibels
121{
122 return 10.0F * std::log10(value);
123}
Here is the caller graph for this function:

◆ convert_rbgs_to_prbs()

prb_bitmap srsran::convert_rbgs_to_prbs ( const rbg_bitmap & rbgs,
crb_interval bwp_rbs,
nominal_rbg_size P )

Converts RBG bitmap to PRB bitmap given a BWP PRB dimensions and the nominal RBG-size.

Remarks
See TS 38.214, Sections 5.1.2.2.1 and 6.1.2.2.1.
29{
30 int idx = 0;
31 unsigned first_rbg_size = get_rbg_size(bwp_rbs, P, 0);
32
33 prb_bitmap prbs(bwp_rbs.length());
34 do {
35 idx = rbgs.find_lowest(idx, rbgs.size(), true);
36 if (idx < 0) {
37 break;
38 }
39 uint32_t prb_idx = (idx - 1) * to_nominal_rbg_size_value(P) + first_rbg_size;
41 std::min(prb_idx + ((idx == 0) ? first_rbg_size : to_nominal_rbg_size_value(P)), (uint32_t)prbs.size());
42 prbs.fill(prb_idx, prb_end);
43 idx++;
44 } while (idx != (int)prbs.size());
45 return prbs;
46}
SRSRAN_FORCE_INLINE size_t size() const noexcept
Current size of the bounded_bitset in bits.
Definition bounded_bitset.h:360
int find_lowest(bool value=true) const noexcept
Finds the lowest bit with value set to the value passed as argument.
Definition bounded_bitset.h:642
uint32_t get_rbg_size(crb_interval bwp_rbs, nominal_rbg_size P, uint32_t rbg_idx)
Definition resource_block_group.cpp:54

◆ copy_segments()

size_t srsran::copy_segments ( const ByteBufferType & src,
span< uint8_t > dst )
inline

Perfoms a segment-wise copy of the byte_buffer into a span<uint8_t> object. The length is limited by the length of src and dst, whichever is smaller.

Parameters
srcSource byte_buffer.
dstDestination span<uint8_t>.
Returns
Number of bytes copied.
664{
665 size_t bytes_copied = 0;
666 size_t bytes_remaining = std::min(src.length(), dst.size_bytes());
667 for (const auto& src_segment : src.segments()) {
668 size_t block_size = std::min(bytes_remaining, src_segment.size());
669 span<uint8_t> dst_segment = dst.subspan(bytes_copied, block_size);
670 std::copy(src_segment.begin(), src_segment.begin() + block_size, dst_segment.begin());
671 bytes_copied += block_size;
672 bytes_remaining -= block_size;
673 if (bytes_remaining == 0) {
674 break;
675 }
676 }
677 return bytes_copied;
678}
Definition span.h:98
constexpr size_type size_bytes() const noexcept
Returns the size of the sequence in bytes.
Definition span.h:171
constexpr iterator begin() const noexcept
Returns an iterator to the first element of the span.
Definition span.h:204
span< element_type > subspan(size_type offset, size_type count) const
Obtains a span that is a view over the count elements of this span starting at offset offset.
Definition span.h:232

◆ count_ones()

template<typename Integer >
int srsran::count_ones ( Integer value)

Counts the number of bits set to one in an integer.

244{
246}
Definition bounded_bitset.h:84

◆ cpu_supports_feature()

bool srsran::cpu_supports_feature ( cpu_feature feature)
inline

Query the CPU whether a CPU feature is supported in runtime.

Parameters
[in]featureSelects the given feature to query.
Returns
True if the feature is supported.
101{
102 switch (feature) {
103#ifdef __x86_64__
104 case cpu_feature::avx:
105 return __builtin_cpu_supports("avx");
106 case cpu_feature::avx2:
107 return __builtin_cpu_supports("avx2");
108 case cpu_feature::avx512f:
109 return __builtin_cpu_supports("avx512f");
110 case cpu_feature::avx512bw:
111 return __builtin_cpu_supports("avx512bw");
112 case cpu_feature::avx512vl:
113 return __builtin_cpu_supports("avx512vl");
114 case cpu_feature::avx512dq:
115 return __builtin_cpu_supports("avx512dq");
116 case cpu_feature::avx512cd:
117 return __builtin_cpu_supports("avx512cd");
118 case cpu_feature::pclmul:
119 return __builtin_cpu_supports("pclmul");
120 case cpu_feature::sse4_1:
121 return __builtin_cpu_supports("sse4.1");
122 case cpu_feature::fma:
123 return __builtin_cpu_supports("fma");
124#endif // __x86_64__
125#ifdef __aarch64__
126#ifdef __ARM_NEON
127 case cpu_feature::neon:
128 return true;
129#endif // __ARM_NEON
130#endif // __aarch64__
131 default:
132 return false;
133 }
134}

◆ cpu_supports_included_features()

bool srsran::cpu_supports_included_features ( )
inline
192{
193 for (cpu_feature feature : cpu_features_included) {
194 if (!cpu_supports_feature(feature)) {
195 return false;
196 }
197 }
198 return true;
199}
cpu_feature
CPU feature list.
Definition cpu_features.h:32
bool cpu_supports_feature(cpu_feature feature)
Query the CPU whether a CPU feature is supported in runtime.
Definition cpu_features.h:100

◆ crb_to_prb() [1/4]

prb_interval srsran::crb_to_prb ( const bwp_configuration & bwp_cfg,
crb_interval crbs )
inline

Convert CRBs to PRBs within a BWP. CRBs and PRBs are assumed to have the same numerology of the provided BWP configuration.

69{
70 return crb_to_prb(bwp_cfg.crbs, crbs);
71}

◆ crb_to_prb() [2/4]

unsigned srsran::crb_to_prb ( const bwp_configuration & bwp_cfg,
unsigned crb )
inline

Convert CRB within a BWP into a PRB. The CRB and PRB are assumed to use the same numerology as reference.

Parameters
bwp_cfgBWP configuration of the respective CRB.
crbCRB to be converted to PRB.
Returns
Calculated PRB.
62{
63 return crb_to_prb(bwp_cfg.crbs, crb);
64}

◆ crb_to_prb() [3/4]

prb_interval srsran::crb_to_prb ( crb_interval bwp_crb_lims,
crb_interval crbs )
inline

Convert an interval of CRBs to an interval of PRBs, given the BWP CRB limits.

60{
61 return prb_interval{crb_to_prb(bwp_crb_lims, crbs.start()), crb_to_prb(bwp_crb_lims, crbs.stop())};
62}

◆ crb_to_prb() [4/4]

unsigned srsran::crb_to_prb ( crb_interval bwp_crb_lims,
unsigned crb )
inline

Convert CRB into PRB given the CRB assignment limits. The CRB and PRB are assumed to use the same numerology as reference.

Parameters
bwp_crb_limsBWP CRB limits set based on the active BWP configuration.
crbCRB to be converted to PRB.
Returns
Calculated PRB.
50{
51 srsran_sanity_check(bwp_crb_lims.contains(crb) or crb == bwp_crb_lims.stop(),
52 "CRB={} falls outside BWP limits={}",
53 crb,
54 bwp_crb_lims);
55 return crb - bwp_crb_lims.start();
56}
bool contains(T point) const
If interval contains provided point.
Definition interval.h:117

◆ crb_to_vrb_f1_0_common_ss_non_interleaved()

vrb_interval srsran::crb_to_vrb_f1_0_common_ss_non_interleaved ( crb_interval crbs,
unsigned coreset_crb_start )
inline

Conversion of CRBs to VRBs for a common search space and DCI format 1_0 as per TS38.211, clause 7.3.1.6.

Parameters
crbsCRB interval to be converted to VRB interval.
coreset_crb_startStart of the coreset CRB interval.
Returns
VRB interval.
86{
87 srsran_sanity_check(crbs.start() >= coreset_crb_start, "Invalid CRB start");
88 return vrb_interval{crbs.start() - coreset_crb_start, crbs.stop() - coreset_crb_start};
89}

◆ create_amplitude_controller_clipping_factory()

std::shared_ptr< amplitude_controller_factory > srsran::create_amplitude_controller_clipping_factory ( const amplitude_controller_clipping_config & config)

Creates a clipping amplitude controller factory.

73{
74 return std::make_shared<amplitude_controller_clipping_factory>(config);
75}

◆ create_amplitude_controller_scaling_factory()

std::shared_ptr< amplitude_controller_factory > srsran::create_amplitude_controller_scaling_factory ( float gain_dB_)

Creates a scaling amplitude controller factory.

78{
79 return std::make_shared<amplitude_controller_scaling_factory>(gain_dB_);
80}

◆ create_asynchronous_resource_grid_pool()

std::unique_ptr< resource_grid_pool > srsran::create_asynchronous_resource_grid_pool ( unsigned expire_timeout_slots,
task_executor & async_executor,
std::vector< std::unique_ptr< resource_grid > > grids )

Creates an asynchronous resource grid pool.

It selects a different resource grid every time a resource grid is requested. The resource grid expires expire_timeout_slots after it is requested. When a resource grid expires, it is asynchronously set to zero.

The resource grid repetition is not deterministic but it is guaranteed that it is repeated after expire_timeout_slots.

Parameters
[in]expire_timeout_slotsNumber of slots after which resource grids are expired.
[in]async_executorAsynchronous task executor for setting the grid to zero.
[in]gridsResource grids, ownerships are transferred to the pool.
Returns
An asynchronous resource grid pool.
74{
75 return std::make_unique<resource_grid_pool_asynchronous_impl>(expire_timeout_slots, async_executor, std::move(grids));
76}

◆ create_channel_equalizer_factory_zf()

std::shared_ptr< channel_equalizer_factory > srsran::create_channel_equalizer_factory_zf ( )

Creates a Zero Forcing channel equalizer factory.

40{
41 return std::make_shared<channel_equalizer_factory_zf>();
42}

◆ create_channel_modulation_sw_factory()

std::shared_ptr< channel_modulation_factory > srsran::create_channel_modulation_sw_factory ( )
52{
53 return std::make_shared<channel_modulation_sw_factory>();
54}

◆ create_channel_precoder_factory()

std::shared_ptr< channel_precoder_factory > srsran::create_channel_precoder_factory ( const std::string & precoder_type)

Creates and returns a channel precoder factory.

Parameters
[in]precoder_typeA string indicating the precoder implementation to create. Values: generic, auto, avx2.
Returns
A channel precoder factory for the chosen precoder implementation.
78{
79 return std::make_shared<channel_precoder_factory_impl>(precoder_type);
80}

◆ create_crc_calculator_factory_sw()

std::shared_ptr< crc_calculator_factory > srsran::create_crc_calculator_factory_sw ( const std::string & type)
302{
303 return std::make_shared<crc_calculator_factory_sw_impl>(type);
304}

◆ create_csi_report_configuration()

csi_report_configuration srsran::create_csi_report_configuration ( const csi_meas_config & csi_meas)

Returns the Chanel State Information (CSI) report configuration parameters based on CSI-MeasConfig.

Parameters
csi_measCSI-RS measurement configuration.
Returns
Returns CSI report configuration parameters.
29{
31 csi_rep.pmi_codebook = pmi_codebook_type::one;
32
33 // TODO: support more CSI reports.
34 const csi_report_config& csi_rep_cfg = csi_meas.csi_report_cfg_list[0];
35
36 // TODO: support more CSI resource sets.
39 csi_meas.csi_res_cfg_list[csi_rep_cfg.res_for_channel_meas].csi_rs_res_set_list)
40 .nzp_csi_rs_res_set_list[0];
41 csi_rep.nof_csi_rs_resources = csi_meas.nzp_csi_rs_res_set_list[nzp_csi_set_id].nzp_csi_rs_res.size();
42
43 // Enable indicators
44 switch (csi_rep_cfg.report_qty_type) {
45 case csi_report_config::report_quantity_type_t::none:
46 break;
47 case csi_report_config::report_quantity_type_t::cri_ri_li_pmi_cqi:
48 csi_rep.quantities = csi_report_quantities::cri_ri_li_pmi_cqi;
49 break;
50 case csi_report_config::report_quantity_type_t::cri_ri_pmi_cqi:
51 csi_rep.quantities = csi_report_quantities::cri_ri_pmi_cqi;
52 break;
53 case csi_report_config::report_quantity_type_t::cri_ri_cqi:
54 csi_rep.quantities = csi_report_quantities::cri_ri_cqi;
55 break;
56 default:
57 csi_rep.quantities = csi_report_quantities::other;
58 break;
59 }
60
61 if (csi_rep_cfg.codebook_cfg.has_value()) {
63 const auto& type1 = variant_get<codebook_config::type1>(csi_rep_cfg.codebook_cfg->codebook_type);
65 using single_panel = codebook_config::type1::single_panel;
66 const auto& panel = variant_get<single_panel>(type1.sub_type);
67
69 panel.nof_antenna_ports)) {
70 csi_rep.pmi_codebook = pmi_codebook_type::two;
72 csi_rep.pmi_codebook = pmi_codebook_type::typeI_single_panel_4ports_mode1;
73 } else {
74 csi_rep.pmi_codebook = pmi_codebook_type::other;
75 }
76
77 csi_rep.ri_restriction = panel.typei_single_panel_ri_restriction;
78 } else {
79 report_fatal_error("Codebook panel type not supported");
80 }
81 } else {
82 report_fatal_error("Codebook type not supported");
83 }
84 }
85
86 return csi_rep;
87}
nzp_csi_rs_res_set_id_t
NZP-CSI-RS-ResourceSetId is used to identify one NZP-CSI-RS-ResourceSet.
Definition csi_rs_id.h:39
See TS 38.331, typeI-SinglePanel in CodebookConfig.
Definition codebook_config.h:36
Definition csi_report_config.h:73
optional< codebook_config > codebook_cfg
Codebook configuration for Type-1 or Type-2 including codebook subset restriction.
Definition csi_report_config.h:249
csi_res_config_id_t res_for_channel_meas
Resources for channel measurement.
Definition csi_report_config.h:232
Collects Chanel State Information (CSI) report configuration parameters.
Definition csi_report_configuration.h:61
pmi_codebook_type pmi_codebook
CSI-RS PMI codebook configuration.
Definition csi_report_configuration.h:67

◆ create_cu_cp()

std::unique_ptr< srs_cu_cp::cu_cp > srsran::create_cu_cp ( const srs_cu_cp::cu_cp_configuration & cfg_)

Creates an instance of an CU-CP.

30{
31 return std::make_unique<srs_cu_cp::cu_cp_impl>(cfg_);
32}

◆ create_cu_up()

std::unique_ptr< srs_cu_up::cu_up_interface > srsran::create_cu_up ( const srs_cu_up::cu_up_configuration & cfg_)

Creates an instance of an CU-UP.

29{
30 return std::make_unique<srs_cu_up::cu_up>(cfg_);
31}

◆ create_dft_processor_factory_fftw()

std::shared_ptr< dft_processor_factory > srsran::create_dft_processor_factory_fftw ( const std::string & optimization_flag,
double plan_creation_timeout_s,
bool avoid_wisdom = false,
const std::string & wisdom_filename = "" )

Creates a DFT processor factory based on FFTW library.

Parameters
[in]optimization_flagFFTW planning optimization mode. Leave empty for default value. Available modes:
  • estimate picks a sub-optimal plan quickly, using heuristics.
  • measure finds an optimized FFT plan by computing several FFTs and measuring their execution time.
  • exhaustive is like measure but it tries to achieve an even higher optimization.
[in]plan_creation_timeout_sFFTW plan creation maximum duration in seconds. Set to zero or lower for infinite.
[in]avoid_wisdomSet to true to avoid loading FFTW wisdom from a file.
[in]wisdom_filenameFFTW wisdom file name. Leave empty for default value. It is ignored if the option avoid_wisdom is true.
Returns
A valid pointer to a DFT processor factory if FFTW is available. Otherwise, nullptr.
Note
If the plan creation timeout is reached, the selected plan is sub-optimal. However, it will always be more optimal than estimate.
90{
91#ifdef ENABLE_FFTW
92 return std::make_shared<dft_processor_factory_fftw>(
93 optimization_flag, plan_creation_timeout_s, avoid_wisdom, wisdom_filename);
94#else // ENABLE_FFTW
95 return nullptr;
96#endif // ENABLE_FFTW
97}

◆ create_dft_processor_factory_fftw_fast()

std::shared_ptr< dft_processor_factory > srsran::create_dft_processor_factory_fftw_fast ( bool avoid_wisdom = false,
const std::string & wisdom_filename = "" )
inline

Creates an optimal DFT processor factory based on FFTW library.

Parameters
[in]avoid_wisdomSet to true to avoid loading FFTW wisdom from a file.
[in]wisdom_filenameFFTW wisdom file name. Leave empty for default value. It is ignored if the option avoid_wisdom is true.
Returns
A valid pointer to a DFT processor factory if FFTW is available. Otherwise, nullptr.
83{
84 std::string optimization_flag;
85#if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_MEMORY__)
86 return create_dft_processor_factory_fftw_slow(avoid_wisdom, wisdom_filename);
87#else
88 return create_dft_processor_factory_fftw("measure", 5.0, avoid_wisdom, wisdom_filename);
89#endif
90}
std::shared_ptr< dft_processor_factory > create_dft_processor_factory_fftw_slow(bool avoid_wisdom=false, const std::string &wisdom_filename="")
Creates a sub-optimal DFT processor factory based on FFTW library.
Definition generic_functions_factories.h:71
std::shared_ptr< dft_processor_factory > create_dft_processor_factory_fftw(const std::string &optimization_flag, double plan_creation_timeout_s, bool avoid_wisdom=false, const std::string &wisdom_filename="")
Creates a DFT processor factory based on FFTW library.
Definition generic_functions_factories.cpp:86

◆ create_dft_processor_factory_fftw_slow()

std::shared_ptr< dft_processor_factory > srsran::create_dft_processor_factory_fftw_slow ( bool avoid_wisdom = false,
const std::string & wisdom_filename = "" )
inline

Creates a sub-optimal DFT processor factory based on FFTW library.

Parameters
[in]avoid_wisdomSet to true to avoid loading FFTW wisdom from a file.
[in]wisdom_filenameFFTW wisdom file name. Leave empty for default value. It is ignored if the option avoid_wisdom is true.
Returns
A valid pointer to a DFT processor factory if FFTW is available. Otherwise, nullptr.
72{
73 return create_dft_processor_factory_fftw("estimate", 1.0, avoid_wisdom, wisdom_filename);
74}

◆ create_dft_processor_factory_generic()

std::shared_ptr< dft_processor_factory > srsran::create_dft_processor_factory_generic ( )

Creates a DFT processor factory based on a generic Radix-2 DFT implementation.

82{
83 return std::make_shared<dft_processor_factory_generic>();
84}

◆ create_dl_processor_pool()

std::unique_ptr< downlink_processor_pool > srsran::create_dl_processor_pool ( downlink_processor_pool_config config)

Creates and returns a downlink processor pool.

864{
865 // Convert from pool config to pool_impl config.
867 dl_processors.num_sectors = config.num_sectors;
868
869 for (auto& proc : config.dl_processors) {
870 dl_processors.procs.push_back({proc.sector, proc.scs, std::move(proc.procs)});
871 }
872
873 return std::make_unique<downlink_processor_pool_impl>(std::move(dl_processors));
874}

◆ create_dmrs_pbch_processor_factory_sw()

std::shared_ptr< dmrs_pbch_processor_factory > srsran::create_dmrs_pbch_processor_factory_sw ( std::shared_ptr< pseudo_random_generator_factory > prg_factory)
278{
279 return std::make_shared<dmrs_pbch_processor_sw_factory>(std::move(prg_factory));
280}

◆ create_dmrs_pdcch_processor_factory_sw()

std::shared_ptr< dmrs_pdcch_processor_factory > srsran::create_dmrs_pdcch_processor_factory_sw ( std::shared_ptr< pseudo_random_generator_factory > prg_factory)
284{
285 return std::make_shared<dmrs_pdcch_processor_sw_factory>(std::move(prg_factory));
286}

◆ create_dmrs_pdsch_processor_factory_sw()

std::shared_ptr< dmrs_pdsch_processor_factory > srsran::create_dmrs_pdsch_processor_factory_sw ( std::shared_ptr< pseudo_random_generator_factory > prg_factory)
290{
291 return std::make_shared<dmrs_pdsch_processor_sw_factory>(std::move(prg_factory));
292}

◆ create_dmrs_pucch_estimator_factory_sw()

std::shared_ptr< dmrs_pucch_estimator_factory > srsran::create_dmrs_pucch_estimator_factory_sw ( std::shared_ptr< pseudo_random_generator_factory > prg_factory,
std::shared_ptr< low_papr_sequence_collection_factory > lpc_factory,
std::shared_ptr< port_channel_estimator_factory > ch_estimator_factory )
298{
299 return std::make_shared<dmrs_pucch_estimator_sw_factory>(prg_factory, lpc_factory, ch_estimator_factory);
300}

◆ create_dmrs_pusch_estimator_factory_sw()

std::shared_ptr< dmrs_pusch_estimator_factory > srsran::create_dmrs_pusch_estimator_factory_sw ( std::shared_ptr< pseudo_random_generator_factory > prg_factory,
std::shared_ptr< port_channel_estimator_factory > ch_estimator_factory )
305{
306 return std::make_shared<dmrs_pusch_estimator_factory_sw>(std::move(prg_factory), std::move(ch_estimator_factory));
307}

◆ create_downlink_processor_factory_hw()

std::shared_ptr< downlink_processor_factory > srsran::create_downlink_processor_factory_hw ( const downlink_processor_factory_hw_config & config)

Creates a full hardware-accelerated based downlink processor factory.

756{
757 // Create channel coding factories - CRC
758 std::shared_ptr<crc_calculator_factory> crc_calc_factory = config.crc_calc_factory;
759 report_fatal_error_if_not(crc_calc_factory, "Invalid CRC calculator factory.");
760
761 // Create channel coding factories - Polar
762 std::shared_ptr<polar_factory> polar_factory = create_polar_factory_sw();
763 report_fatal_error_if_not(polar_factory, "Invalid POLAR factory.");
764
765 // Create sequence generators factories - PRG
766 std::shared_ptr<pseudo_random_generator_factory> prg_factory = create_pseudo_random_generator_sw_factory();
767 report_fatal_error_if_not(prg_factory, "Invalid PRG factory.");
768
769 // Create modulation mapper factory.
770 std::shared_ptr<channel_modulation_factory> mod_factory = create_channel_modulation_sw_factory();
771 report_fatal_error_if_not(mod_factory, "Invalid modulation factory.");
772
773 // Create channel processors encoder factories - PBCH
774 std::shared_ptr<pbch_encoder_factory> pbch_enc_factory =
775 create_pbch_encoder_factory_sw(crc_calc_factory, prg_factory, polar_factory);
776 report_fatal_error_if_not(pbch_enc_factory, "Invalid PBCH encoder factory.");
777
778 // Create channel processors encoder factories - PDCCH
779 std::shared_ptr<pdcch_encoder_factory> pdcch_enc_factory =
780 create_pdcch_encoder_factory_sw(crc_calc_factory, polar_factory);
781 report_fatal_error_if_not(pdcch_enc_factory, "Invalid PDCCH encoder factory.");
782
783 std::shared_ptr<pdsch_encoder_factory> pdsch_enc_factory = config.pdsch_enc_factory;
784 report_fatal_error_if_not(pdsch_enc_factory, "Invalid PDSCH encoder factory.");
785
786 // Create channel processors modulation factories - PBCH
787 std::shared_ptr<pbch_modulator_factory> pbch_mod_factory = create_pbch_modulator_factory_sw(mod_factory, prg_factory);
788 report_fatal_error_if_not(pbch_mod_factory, "Invalid PBCH modulation factory.");
789
790 // Create channel processors modulation factories - PDCCH
791 std::shared_ptr<pdcch_modulator_factory> pdcch_mod_factory =
792 create_pdcch_modulator_factory_sw(mod_factory, prg_factory);
793 report_fatal_error_if_not(pdcch_mod_factory, "Invalid PDCCH modulation factory.");
794
795 // Create channel processors modulation factories - PDSCH
796 std::shared_ptr<pdsch_modulator_factory> pdsch_mod_factory =
797 create_pdsch_modulator_factory_sw(mod_factory, prg_factory);
798 report_fatal_error_if_not(pdsch_mod_factory, "Invalid PDSCH modulation factory.");
799
800 // Create DMRS generators - PBCH, PSS, SSS
801 std::shared_ptr<dmrs_pbch_processor_factory> dmrs_pbch_proc_factory =
802 create_dmrs_pbch_processor_factory_sw(prg_factory);
803 report_fatal_error_if_not(dmrs_pbch_proc_factory, "Invalid DMRS PBCH factory.");
804
805 std::shared_ptr<pss_processor_factory> pss_proc_factory = create_pss_processor_factory_sw();
806 report_fatal_error_if_not(pss_proc_factory, "Invalid PSS factory.");
807
808 std::shared_ptr<sss_processor_factory> sss_proc_factory = create_sss_processor_factory_sw();
809 report_fatal_error_if_not(sss_proc_factory, "Invalid SSS factory.");
810
811 // Create DMRS generators - PDCCH
812 std::shared_ptr<dmrs_pdcch_processor_factory> dmrs_pdcch_proc_factory =
813 create_dmrs_pdcch_processor_factory_sw(prg_factory);
814 report_fatal_error_if_not(dmrs_pdcch_proc_factory, "Invalid DMRS PDCCH factory.");
815
816 // Create DMRS generators - PDSCH
817 std::shared_ptr<dmrs_pdsch_processor_factory> dmrs_pdsch_proc_factory =
818 create_dmrs_pdsch_processor_factory_sw(prg_factory);
819 report_fatal_error_if_not(dmrs_pdsch_proc_factory, "Invalid DMRS PDSCH factory.");
820
821 // Create channel processors - PDCCH
822 std::shared_ptr<pdcch_processor_factory> pdcch_proc_factory =
823 create_pdcch_processor_factory_sw(pdcch_enc_factory, pdcch_mod_factory, dmrs_pdcch_proc_factory);
824 report_fatal_error_if_not(pdcch_proc_factory, "Invalid PDCCH processor factory.");
825
826 // Create channel processors - PDSCH
827 std::shared_ptr<pdsch_processor_factory> pdsch_proc_factory =
828 create_pdsch_processor_factory_sw(pdsch_enc_factory, pdsch_mod_factory, dmrs_pdsch_proc_factory);
829 report_fatal_error_if_not(pdsch_proc_factory, "Invalid PDSCH processor factory.");
830
831 // Create channel processors - SSB
833 ssb_factory_config.encoder_factory = pbch_enc_factory;
834 ssb_factory_config.modulator_factory = pbch_mod_factory;
838 std::shared_ptr<ssb_processor_factory> ssb_proc_factory = create_ssb_processor_factory_sw(ssb_factory_config);
839 report_fatal_error_if_not(ssb_proc_factory, "Invalid SSB processor factory.");
840
841 // Create signal generators - NZP-CSI-RS
842 std::shared_ptr<nzp_csi_rs_generator_factory> nzp_csi_rs_factory =
843 create_nzp_csi_rs_generator_factory_sw(prg_factory);
844 report_fatal_error_if_not(nzp_csi_rs_factory, "Invalid NZP-CSI-RS generator factory.");
845
846 return std::make_shared<downlink_processor_single_executor_factory>(
847 pdcch_proc_factory, pdsch_proc_factory, ssb_proc_factory, nzp_csi_rs_factory);
848}
Definition channel_coding_factories.h:108
Definition channel_processor_factories.h:274

◆ create_downlink_processor_factory_sw() [1/2]

std::shared_ptr< downlink_processor_factory > srsran::create_downlink_processor_factory_sw ( const downlink_processor_factory_sw_config & config)

Creates a full software based downlink processor factory.

593{
594 // Create channel coding factories - CRC
595 std::shared_ptr<crc_calculator_factory> crc_calc_factory =
596 create_crc_calculator_factory_sw(config.crc_calculator_type);
597 report_fatal_error_if_not(crc_calc_factory, "Invalid CRC calculator factory of type {}.", config.crc_calculator_type);
598
599 // Create channel coding factories - LDPC
600 std::shared_ptr<ldpc_segmenter_tx_factory> ldpc_seg_tx_factory =
601 create_ldpc_segmenter_tx_factory_sw(crc_calc_factory);
602 report_fatal_error_if_not(ldpc_seg_tx_factory, "Invalid LDPC segmenter factory.");
603
604 std::shared_ptr<ldpc_encoder_factory> ldpc_enc_factory = create_ldpc_encoder_factory_sw(config.ldpc_encoder_type);
605 report_fatal_error_if_not(ldpc_enc_factory, "Invalid LDPC encoder factory of type {}.", config.ldpc_encoder_type);
606
607 std::shared_ptr<ldpc_rate_matcher_factory> ldpc_rm_factory = create_ldpc_rate_matcher_factory_sw();
608 report_fatal_error_if_not(ldpc_rm_factory, "Invalid LDPC RM factory.");
609
610 // Create channel coding factories - Polar
611 std::shared_ptr<polar_factory> polar_factory = create_polar_factory_sw();
612 report_fatal_error_if_not(polar_factory, "Invalid POLAR factory.");
613
614 // Create sequence generators factories - PRG
615 std::shared_ptr<pseudo_random_generator_factory> prg_factory = create_pseudo_random_generator_sw_factory();
616 report_fatal_error_if_not(prg_factory, "Invalid PRG factory.");
617
618 // Create modulation mapper factory.
619 std::shared_ptr<channel_modulation_factory> mod_factory = create_channel_modulation_sw_factory();
620 report_fatal_error_if_not(mod_factory, "Invalid modulation factory.");
621
622 // Create channel processors encoder factories - PBCH
623 std::shared_ptr<pbch_encoder_factory> pbch_enc_factory =
624 create_pbch_encoder_factory_sw(crc_calc_factory, prg_factory, polar_factory);
625 report_fatal_error_if_not(pbch_enc_factory, "Invalid PBCH encoder factory.");
626
627 // Create channel processors encoder factories - PDCCH
628 std::shared_ptr<pdcch_encoder_factory> pdcch_enc_factory =
629 create_pdcch_encoder_factory_sw(crc_calc_factory, polar_factory);
630 report_fatal_error_if_not(pdcch_enc_factory, "Invalid PDCCH encoder factory.");
631
632 // Create channel processors encoder factories - PDSCH
636 pdsch_enc_factory_config.rate_matcher_factory = ldpc_rm_factory;
637
638 std::shared_ptr<pdsch_encoder_factory> pdsch_enc_factory = create_pdsch_encoder_factory_sw(pdsch_enc_factory_config);
639 report_fatal_error_if_not(pdsch_enc_factory, "Invalid PDSCH encoder factory.");
640
641 // Create channel processors modulation factories - PBCH
642 std::shared_ptr<pbch_modulator_factory> pbch_mod_factory = create_pbch_modulator_factory_sw(mod_factory, prg_factory);
643 report_fatal_error_if_not(pbch_mod_factory, "Invalid PBCH modulation factory.");
644
645 // Create channel processors modulation factories - PDCCH
646 std::shared_ptr<pdcch_modulator_factory> pdcch_mod_factory =
647 create_pdcch_modulator_factory_sw(mod_factory, prg_factory);
648 report_fatal_error_if_not(pdcch_mod_factory, "Invalid PDCCH modulation factory.");
649
650 // Create channel processors modulation factories - PDSCH
651 std::shared_ptr<pdsch_modulator_factory> pdsch_mod_factory =
652 create_pdsch_modulator_factory_sw(mod_factory, prg_factory);
653 report_fatal_error_if_not(pdsch_mod_factory, "Invalid PDSCH modulation factory.");
654
655 // Create DMRS generators - PBCH, PSS, SSS
656 std::shared_ptr<dmrs_pbch_processor_factory> dmrs_pbch_proc_factory =
657 create_dmrs_pbch_processor_factory_sw(prg_factory);
658 report_fatal_error_if_not(dmrs_pbch_proc_factory, "Invalid DMRS PBCH factory.");
659
660 std::shared_ptr<pss_processor_factory> pss_proc_factory = create_pss_processor_factory_sw();
661 report_fatal_error_if_not(pss_proc_factory, "Invalid PSS factory.");
662
663 std::shared_ptr<sss_processor_factory> sss_proc_factory = create_sss_processor_factory_sw();
664 report_fatal_error_if_not(sss_proc_factory, "Invalid SSS factory.");
665
666 // Create DMRS generators - PDCCH
667 std::shared_ptr<dmrs_pdcch_processor_factory> dmrs_pdcch_proc_factory =
668 create_dmrs_pdcch_processor_factory_sw(prg_factory);
669 report_fatal_error_if_not(dmrs_pdcch_proc_factory, "Invalid DMRS PDCCH factory.");
670
671 // Create DMRS generators - PDSCH
672 std::shared_ptr<dmrs_pdsch_processor_factory> dmrs_pdsch_proc_factory =
673 create_dmrs_pdsch_processor_factory_sw(prg_factory);
674 report_fatal_error_if_not(dmrs_pdsch_proc_factory, "Invalid DMRS PDSCH factory.");
675
676 // Create channel processors - PDCCH
677 std::shared_ptr<pdcch_processor_factory> pdcch_proc_factory =
678 create_pdcch_processor_factory_sw(pdcch_enc_factory, pdcch_mod_factory, dmrs_pdcch_proc_factory);
679 report_fatal_error_if_not(pdcch_proc_factory, "Invalid PDCCH processor factory.");
680
681 // Create channel processors - PDSCH
682 std::shared_ptr<pdsch_processor_factory> pdsch_proc_factory;
684 pdsch_proc_factory =
685 create_pdsch_processor_factory_sw(pdsch_enc_factory, pdsch_mod_factory, dmrs_pdsch_proc_factory);
689 report_fatal_error_if_not(pdsch_processor_config.nof_pdsch_codeblock_threads >= 2,
690 "The number of threads (i.e., {}) must be equal to or greater than 2.");
691 report_fatal_error_if_not(pdsch_processor_config.pdsch_codeblock_task_executor != nullptr,
692 "Invalid codeblock executor.");
693
694 // Create concurrent PDSCH processor factory base.
695 pdsch_proc_factory =
696 create_pdsch_concurrent_processor_factory_sw(crc_calc_factory,
699 prg_factory,
702 *pdsch_processor_config.pdsch_codeblock_task_executor,
703 pdsch_processor_config.nof_pdsch_codeblock_threads);
704 report_fatal_error_if_not(pdsch_proc_factory, "Invalid PDSCH processor factory.");
706 pdsch_proc_factory = create_pdsch_lite_processor_factory_sw(
708 }
709 report_fatal_error_if_not(pdsch_proc_factory, "Invalid PDSCH processor factory.");
710
711 // Create channel processors - SSB
713 ssb_factory_config.encoder_factory = pbch_enc_factory;
714 ssb_factory_config.modulator_factory = pbch_mod_factory;
718 std::shared_ptr<ssb_processor_factory> ssb_proc_factory = create_ssb_processor_factory_sw(ssb_factory_config);
719 report_fatal_error_if_not(ssb_proc_factory, "Invalid SSB processor factory.");
720
721 // Create signal generators - NZP-CSI-RS
722 std::shared_ptr<nzp_csi_rs_generator_factory> nzp_csi_rs_factory =
723 create_nzp_csi_rs_generator_factory_sw(prg_factory);
724 report_fatal_error_if_not(nzp_csi_rs_factory, "Invalid NZP-CSI-RS generator factory.");
725
726 // Wrap the downlink processor dependencies with pools to allow concurrent execution.
727 if (config.nof_concurrent_threads > 1) {
728 // If the PDSCH instance is concurrent, the number of instances is given by the PDSCH processor configuration.
729 unsigned max_nof_simultaneous_pdsch = config.nof_concurrent_threads;
731 max_nof_simultaneous_pdsch =
733 }
734
735 pdcch_proc_factory =
736 create_pdcch_processor_pool_factory(std::move(pdcch_proc_factory), config.nof_concurrent_threads);
737 report_fatal_error_if_not(pdcch_proc_factory, "Invalid PDCCH processor pool factory.");
738
739 pdsch_proc_factory = create_pdsch_processor_pool(std::move(pdsch_proc_factory), max_nof_simultaneous_pdsch);
740 report_fatal_error_if_not(pdcch_proc_factory, "Invalid PDSCH processor pool factory.");
741
742 ssb_proc_factory = create_ssb_processor_pool_factory(std::move(ssb_proc_factory), config.nof_concurrent_threads);
743 report_fatal_error_if_not(pdcch_proc_factory, "Invalid SSB processor pool factory.");
744
745 nzp_csi_rs_factory =
746 create_nzp_csi_rs_generator_pool_factory(std::move(nzp_csi_rs_factory), config.nof_concurrent_threads);
747 report_fatal_error_if_not(pdcch_proc_factory, "Invalid NZP-CSI-RS generator pool factory.");
748 }
749
750 return std::make_shared<downlink_processor_single_executor_factory>(
751 pdcch_proc_factory, pdsch_proc_factory, ssb_proc_factory, nzp_csi_rs_factory);
752}
Definition channel_processor_factories.h:124
Concurrent PDSCH processor configuration parameters.
Definition upper_phy_factories.h:129

◆ create_downlink_processor_factory_sw() [2/2]

std::shared_ptr< lower_phy_downlink_processor_factory > srsran::create_downlink_processor_factory_sw ( std::shared_ptr< pdxch_processor_factory > pdxch_proc_factory,
std::shared_ptr< amplitude_controller_factory > amplitude_control_factory )

Creates a software based downlink processor factory.

77{
78 return std::make_shared<lower_phy_downlink_processor_factory_sw>(std::move(pdxch_proc_factory),
79 std::move(amplitude_control_factory));
80}

◆ create_du_high_mac()

std::unique_ptr< mac_interface > srsran::create_du_high_mac ( const mac_config & mac_cfg,
const srs_du::du_test_config & test_cfg )

Create a MAC instance for DU-high. In case the test mode is enabled, the MAC messages will be intercepted.

648{
649 if (not test_cfg.test_ue.has_value()) {
650 return create_mac(mac_cfg);
651 }
652
653 // Create a MAC test mode adapter that wraps the real MAC.
654 auto mac_testmode = std::make_unique<mac_test_mode_adapter>(*test_cfg.test_ue, mac_cfg.phy_notifier);
655 mac_testmode->connect(create_mac(mac_config{mac_cfg.ul_ccch_notifier,
656 mac_cfg.ue_exec_mapper,
657 mac_cfg.cell_exec_mapper,
658 mac_cfg.ctrl_exec,
659 mac_testmode->get_phy_notifier(),
660 mac_cfg.mac_cfg,
661 mac_cfg.pcap,
662 mac_cfg.sched_cfg,
663 mac_cfg.metric_notifier}));
664 return mac_testmode;
665}
Configuration passed to MAC during its instantiation.
Definition mac_config.h:50
optional< test_ue_config > test_ue
Creation of a phantom UE for testing purposes.
Definition du_test_config.h:47

◆ create_dummy_ru()

std::unique_ptr< radio_unit > srsran::create_dummy_ru ( const ru_dummy_configuration & config,
ru_dummy_dependencies & dependencies )

Returns a generic Radio Unit using the given configuration.

32{
33 return std::make_unique<ru_dummy_impl>(config, dependencies);
34}

◆ create_dynamic_radio_factory()

std::unique_ptr< radio_factory > srsran::create_dynamic_radio_factory ( )

Dynamic library radio factory creation entry point.

Implement a radio factory with this function for loading the radio factory through a dynamic library.

◆ create_e1ap_pcap()

std::unique_ptr< dlt_pcap > srsran::create_e1ap_pcap ( const std::string & filename,
task_executor & backend_exec )
95{
96 return create_dlt_pcap(PCAP_E1AP_DLT, "E1AP", filename, backend_exec);
97}

◆ create_e2()

std::unique_ptr< e2_interface > srsran::create_e2 ( e2ap_configuration & e2ap_cfg_,
timer_factory timers_,
e2_message_notifier & e2_pdu_notifier_,
e2_subscription_manager & e2_subscriber_,
e2sm_manager & e2sm_manager_ )

Creates an instance of an E2 interface, notifying outgoing packets on the specified listener object.

35{
36 auto e2 = std::make_unique<e2_impl>(e2ap_cfg_, timers_, e2_pdu_notifier_, e2_subscription_mngr_, e2sm_mngr_);
37 return e2;
38}

◆ create_e2_entity()

std::unique_ptr< e2_interface > srsran::create_e2_entity ( e2ap_configuration & e2ap_cfg_,
e2_connection_client * e2_client_,
e2_du_metrics_interface & e2_du_metrics_,
srs_du::f1ap_ue_id_translator & f1ap_ue_id_translator_,
du_configurator & du_configurator_,
timer_factory timers_,
task_executor & e2_exec_ )

Creates a instance of an E2 interface (with subscription manager)

59{
60 auto e2_ext = std::make_unique<e2_entity>(
62 return e2_ext;
63}

◆ create_e2_with_task_exec()

std::unique_ptr< e2_interface > srsran::create_e2_with_task_exec ( e2ap_configuration & e2ap_cfg_,
timer_factory timers_,
e2_message_notifier & e2_pdu_notifier_,
e2_subscription_manager & e2_subscription_mngr_,
e2sm_manager & e2sm_manager_,
task_executor & e2_exec_ )

Creates a decorated instance of an E2 interface (with a task executor)

46{
47 auto e2 = std::make_unique<e2_impl>(e2ap_cfg_, timers_, e2_pdu_notifier_, e2_subscription_mngr_, e2sm_mngr_);
48 auto e2_ext = std::make_unique<e2_entity>(e2ap_cfg_, std::move(e2), e2_exec_);
49 return e2_ext;
50}

◆ create_e2ap_asn1_packer()

std::unique_ptr< e2ap_packer > srsran::create_e2ap_asn1_packer ( sctp_network_gateway_data_handler & gw_,
e2_message_handler & e2_,
dlt_pcap & pcap_ )

Creates an instance of an E2AP ASN1 packer.

67{
68 auto packer = std::make_unique<e2ap_asn1_packer>(gw_, e2_, pcap_);
69 return packer;
70}

◆ create_e2ap_pcap()

std::unique_ptr< dlt_pcap > srsran::create_e2ap_pcap ( const std::string & filename,
task_executor & backend_exec )
105{
106 return create_dlt_pcap(PCAP_E2AP_DLT, "E2AP", filename, backend_exec);
107}

◆ create_e2sm()

std::unique_ptr< e2sm_handler > srsran::create_e2sm ( std::string e2sm_version,
e2sm_kpm_meas_provider & meas_provider )

create instance of e2sm handler

29{
30 if (e2sm_version == "E2SM-KPM") {
31 return std::make_unique<e2sm_kpm_asn1_packer>(meas_provider);
32 }
33 return nullptr;
34}

◆ create_execution_context() [1/3]

std::unique_ptr< task_execution_context > srsran::create_execution_context ( const execution_config_helper::priority_multiqueue_worker & params)

Create a multi-priority worker execution context.

570{
572}

◆ create_execution_context() [2/3]

std::unique_ptr< task_execution_context > srsran::create_execution_context ( const execution_config_helper::single_worker & params)

Create a single worker execution context.

273{
274 switch (params.queue.policy) {
275 case concurrent_queue_policy::locking_mpsc:
276 if (params.wait_sleep_time.has_value()) {
277 return single_worker_context<concurrent_queue_policy::locking_mpsc,
278 concurrent_queue_wait_policy::sleep>::create(params.name, params);
279 }
280 return single_worker_context<concurrent_queue_policy::locking_mpsc,
281 concurrent_queue_wait_policy::condition_variable>::create(params.name, params);
282 case concurrent_queue_policy::locking_mpmc:
283 if (params.wait_sleep_time.has_value()) {
284 srslog::fetch_basic_logger("ALL").error("Wait sleep time not supported for locking_mpmc queue policy");
285 return nullptr;
286 }
287 return single_worker_context<concurrent_queue_policy::locking_mpmc,
288 concurrent_queue_wait_policy::condition_variable>::create(params.name, params);
289 break;
290 case concurrent_queue_policy::lockfree_spsc: {
291 if (not params.wait_sleep_time.has_value()) {
292 srslog::fetch_basic_logger("ALL").error("Wait sleep time is required for lockfree_spsc queue policy");
293 return nullptr;
294 }
295 return single_worker_context<concurrent_queue_policy::lockfree_spsc, concurrent_queue_wait_policy::sleep>::create(
296 params.name, params);
297 } break;
298 case concurrent_queue_policy::lockfree_mpmc: {
299 if (not params.wait_sleep_time.has_value()) {
300 srslog::fetch_basic_logger("ALL").error("Wait sleep time is required for lockfree_mpmc queue policy");
301 return nullptr;
302 }
303 return single_worker_context<concurrent_queue_policy::lockfree_mpmc, concurrent_queue_wait_policy::sleep>::create(
304 params.name, params);
305 } break;
306 default:
307 srslog::fetch_basic_logger("ALL").error("Unknown queue policy");
308 break;
309 }
310 return nullptr;
311}
concurrent_queue_policy policy
Queue policy to use for the task queue. E.g. SPSC, MPSC, MPMC, etc.
Definition concurrent_queue.h:57
std::string name
Worker name.
Definition task_execution_manager.h:97
task_queue queue
Queue used by the task worker.
Definition task_execution_manager.h:99
optional< std::chrono::microseconds > wait_sleep_time
Wait time in microseconds, when task queue has no pending tasks. If not set, a condition variable is ...
Definition task_execution_manager.h:104

◆ create_execution_context() [3/3]

std::unique_ptr< task_execution_context > srsran::create_execution_context ( const execution_config_helper::worker_pool & params)

Create a worker pool execution context.

430{
431 report_error_if_not(params.queues.size() > 0 and params.queues.size() <= 2,
432 "Invalid number of prioritized queues {}",
433 params.queues.size());
434
435 // TODO: Use visit.
436 switch (params.queues[0].policy) {
437 case concurrent_queue_policy::locking_mpmc:
438 if (params.queues.size() == 1) {
439 return worker_pool_context<concurrent_queue_policy::locking_mpmc>::create(params);
440 } else {
441 switch (params.queues[1].policy) {
442 case concurrent_queue_policy::lockfree_mpmc:
443 return worker_pool_context<concurrent_queue_policy::locking_mpmc,
444 concurrent_queue_policy::lockfree_mpmc>::create(params);
445 case concurrent_queue_policy::locking_mpmc:
446 return worker_pool_context<concurrent_queue_policy::locking_mpmc,
447 concurrent_queue_policy::locking_mpmc>::create(params);
448 default:
449 break;
450 }
451 }
452 break;
453 case concurrent_queue_policy::lockfree_mpmc:
454 if (params.queues.size() == 1) {
455 return worker_pool_context<concurrent_queue_policy::lockfree_mpmc>::create(params);
456 } else {
457 switch (params.queues[1].policy) {
458 case concurrent_queue_policy::lockfree_mpmc:
459 return worker_pool_context<concurrent_queue_policy::lockfree_mpmc,
460 concurrent_queue_policy::lockfree_mpmc>::create(params);
461 case concurrent_queue_policy::locking_mpmc:
462 return worker_pool_context<concurrent_queue_policy::lockfree_mpmc,
463 concurrent_queue_policy::locking_mpmc>::create(params);
464 default:
465 break;
466 }
467 }
468 default:
469 break;
470 }
471 srslog::fetch_basic_logger("ALL").error("Only MPMC queue policies are supported for worker pools");
472 return nullptr;
473}
std::vector< task_queue > queues
Queue(s) used by the task worker. The lower the index, the higher the priority.
Definition task_execution_manager.h:120

◆ create_f1ap_pcap()

std::unique_ptr< dlt_pcap > srsran::create_f1ap_pcap ( const std::string & filename,
task_executor & backend_exec )
90{
91 return create_dlt_pcap(PCAP_F1AP_DLT, "F1AP", filename, backend_exec);
92}

◆ create_generic_resource_grid_pool()

std::unique_ptr< resource_grid_pool > srsran::create_generic_resource_grid_pool ( std::vector< std::unique_ptr< resource_grid > > grids)

Creates a generic resource grid pool.

It selects a different resource grid every time a resource grid is requested. The resource grid is repeated every grids.size() requests.

Parameters
[in]gridsResource grids, ownerships are transferred to the pool.
Returns
A generic resource grid pool.
66{
67 return std::make_unique<resource_grid_pool_generic_impl>(std::move(grids));
68}

◆ create_generic_ru()

std::unique_ptr< radio_unit > srsran::create_generic_ru ( ru_generic_configuration & config)

Returns a generic Radio Unit using the given configuration.

74{
75 // Check the pointers inside the config.
76 if (!is_valid(config)) {
77 return nullptr;
78 }
79
80 std::unique_ptr<radio_notification_handler> radio_event_logger;
81 if (config.rf_logger->warning.enabled()) {
82 radio_event_logger = std::make_unique<ru_radio_notification_handler_logger>(nullptr, *config.rf_logger);
83 }
84
85 // Create radio.
86 auto radio_event_counter = std::make_unique<ru_radio_notification_handler_counter>(
87 std::move(radio_event_logger),
89 get_statistics_time_interval_in_slots(config.statistics_print_interval_s, config.lower_phy_config.front().scs));
90
91 auto radio = build_radio(*config.radio_exec, *radio_event_counter, config.radio_cfg, config.device_driver);
92 report_error_if_not(radio, "Unable to create radio session.");
93
94 // Create received symbol adapter.
95 auto ru_rx_adapter = std::make_unique<ru_rx_symbol_adapter>(*config.symbol_notifier);
96
97 // Create RU and return.
99 ru_cfg.srate_MHz = config.lower_phy_config.front().srate.to_MHz();
100 ru_cfg.ru_rx_adapter = std::move(ru_rx_adapter);
101 ru_cfg.radio = std::move(radio);
102
103 for (unsigned sector_id = 0, sector_end = config.lower_phy_config.size(); sector_id != sector_end; ++sector_id) {
105 low_cfg.sector_id = sector_id;
106 // Update the config with the adapters.
107 low_cfg.bb_gateway = &ru_cfg.radio->get_baseband_gateway(sector_id);
108 low_cfg.rx_symbol_notifier = ru_cfg.ru_rx_adapter.get();
109
110 ru_cfg.ru_time_adapter.push_back(
111 (sector_id == 0) ? static_cast<std::unique_ptr<lower_phy_timing_notifier>>(std::make_unique<ru_timing_adapter>(
112 *config.timing_notifier, std::move(radio_event_counter)))
113 : static_cast<std::unique_ptr<lower_phy_timing_notifier>>(
114 std::make_unique<lower_phy_timing_notifier_dummy>()));
115 low_cfg.timing_notifier = ru_cfg.ru_time_adapter.back().get();
116
117 ru_cfg.phy_err_printer.push_back(std::make_unique<phy_error_adapter>(*low_cfg.logger));
118 low_cfg.error_notifier = ru_cfg.phy_err_printer.back().get();
119
120 // Create lower PHY factory.
122 report_error_if_not(lphy_factory, "Failed to create lower PHY factory.");
123
124 // Create lower PHY.
125 ru_cfg.low_phy.push_back(lphy_factory->create(low_cfg));
126 report_error_if_not(ru_cfg.low_phy.back(), "Unable to create lower PHY.");
127 }
128
129 return std::make_unique<ru_generic_impl>(std::move(ru_cfg));
130}
Lower physical layer interface to notify timing related events.
Definition lower_phy_timing_notifier.h:31
std::shared_ptr< lower_phy_factory > create_lower_phy_factory(lower_phy_configuration &config, unsigned max_nof_prach_concurrent_requests)
Helper class that creates the lower PHY factory using the given configuration.
Definition lower_phy_factory.h:35
bool is_valid(const csi_report_configuration &config)
CSI report configuration validator.
Definition csi_report_config_helpers.cpp:89
Lower physical layer configuration.
Definition lower_phy_configuration.h:73
unsigned statistics_print_interval_s
Statistics print interval in seconds.
Definition ru_generic_configuration.h:56
ru_uplink_plane_rx_symbol_notifier * symbol_notifier
Radio Unit uplink plane received symbol notifier.
Definition ru_generic_configuration.h:48
srslog::basic_logger * rf_logger
Radio logger.
Definition ru_generic_configuration.h:46
radio_configuration::radio radio_cfg
Radio configuration.
Definition ru_generic_configuration.h:40
std::vector< lower_phy_configuration > lower_phy_config
Lower PHY configurations.
Definition ru_generic_configuration.h:42
unsigned max_nof_prach_concurrent_requests
Maximum number of PRACH concurrent requests.
Definition ru_generic_configuration.h:36
std::string device_driver
Device driver.
Definition ru_generic_configuration.h:38
task_executor * radio_exec
Radio executor.
Definition ru_generic_configuration.h:44
ru_timing_notifier * timing_notifier
Radio Unit timing notifier.
Definition ru_generic_configuration.h:50
task_executor * statistics_printer_executor
Statistics printer executor.
Definition ru_generic_configuration.h:52
Radio Unit generic implementation configuration.
Definition ru_generic_impl.h:39
std::vector< std::unique_ptr< phy_error_adapter > > phy_err_printer
PHY error printer.
Definition ru_generic_impl.h:43
double srate_MHz
Sampling rate in MHz.
Definition ru_generic_impl.h:41
std::unique_ptr< radio_session > radio
Radio session instance.
Definition ru_generic_impl.h:49
std::unique_ptr< ru_rx_symbol_adapter > ru_rx_adapter
Radio Unit received symbol adapter.
Definition ru_generic_impl.h:45
std::vector< std::unique_ptr< lower_phy_timing_notifier > > ru_time_adapter
Radio Unit timing adapter.
Definition ru_generic_impl.h:47
std::vector< std::unique_ptr< lower_phy > > low_phy
Lower PHY instance.
Definition ru_generic_impl.h:51

◆ create_gtpu_allocator()

std::unique_ptr< gtpu_teid_pool > srsran::create_gtpu_allocator ( const gtpu_allocator_creation_request & msg)
29{
30 return std::make_unique<gtpu_teid_pool_impl>(msg.max_nof_teids);
31}

◆ create_gtpu_demux()

std::unique_ptr< gtpu_demux > srsran::create_gtpu_demux ( const gtpu_demux_creation_request & msg)

Creates an instance of an GTP-U demux object.

29{
30 report_fatal_error_if_not(msg.cu_up_exec, "CU-UP exec is uninitialized");
31 report_fatal_error_if_not(msg.gtpu_pcap, "CU-UP exec is uninitialized");
32 return std::make_unique<gtpu_demux_impl>(msg.cfg, *msg.cu_up_exec, *msg.gtpu_pcap);
33}

◆ create_gtpu_echo()

std::unique_ptr< gtpu_echo > srsran::create_gtpu_echo ( gtpu_echo_creation_message & msg)

Creates an instance of a GTP-U entity.

31{
32 return std::make_unique<gtpu_echo_impl>(*msg.gtpu_pcap, *msg.tx_upper);
33}

◆ create_gtpu_pcap()

std::unique_ptr< dlt_pcap > srsran::create_gtpu_pcap ( const std::string & filename,
task_executor & backend_exec )
100{
101 return create_dlt_pcap(PCAP_GTPU_DLT, "GTPU", filename, backend_exec);
102}

◆ create_gtpu_tunnel_ngu()

std::unique_ptr< gtpu_tunnel_ngu > srsran::create_gtpu_tunnel_ngu ( gtpu_tunnel_ngu_creation_message & msg)

Creates an instance of a GTP-U entity.

31{
32 return std::make_unique<gtpu_tunnel_ngu_impl>(
33 msg.ue_index, msg.cfg, *msg.gtpu_pcap, *msg.rx_lower, *msg.tx_upper, msg.timers);
34}

◆ create_interpolator()

std::unique_ptr< srsran::interpolator > srsran::create_interpolator ( )

Returns an interpolator.

133{
134 return std::make_unique<interpolator_linear_impl>();
135}

◆ create_io_broker()

std::unique_ptr< io_broker > srsran::create_io_broker ( io_broker_type type,
io_broker_config config = {} )

Creates an instance of an IO broker.

29{
30 switch (type) {
31 case io_broker_type::epoll:
32 return std::make_unique<io_broker_epoll>(config);
33 default:
34 srsran_terminate("IO broker type not supported");
35 }
36 return nullptr;
37}
bool srsran_terminate(const char *fmt, Args &&... args) noexcept
Command to terminate application with an error message, ensuring first that the log is flushed....
Definition error_handling.h:34

◆ create_ldpc_decoder_factory_sw()

std::shared_ptr< ldpc_decoder_factory > srsran::create_ldpc_decoder_factory_sw ( const std::string & dec_type)
270{
271 return std::make_unique<ldpc_decoder_factory_sw>(dec_type);
272}

◆ create_ldpc_encoder_factory_sw()

std::shared_ptr< ldpc_encoder_factory > srsran::create_ldpc_encoder_factory_sw ( const std::string & enc_type)
275{
276 return std::make_unique<ldpc_encoder_factory_sw>(enc_type);
277}

◆ create_ldpc_rate_dematcher_factory_sw()

std::shared_ptr< ldpc_rate_dematcher_factory > srsran::create_ldpc_rate_dematcher_factory_sw ( const std::string & dematcher_type)
281{
282 return std::make_shared<ldpc_rate_dematcher_factory_sw>(dematcher_type);
283}

◆ create_ldpc_rate_matcher_factory_sw()

std::shared_ptr< ldpc_rate_matcher_factory > srsran::create_ldpc_rate_matcher_factory_sw ( )
286{
287 return std::make_shared<ldpc_rate_matcher_factory_sw>();
288}

◆ create_ldpc_segmenter_rx_factory_sw()

std::shared_ptr< ldpc_segmenter_rx_factory > srsran::create_ldpc_segmenter_rx_factory_sw ( )
297{
298 return std::make_shared<ldpc_segmenter_rx_factory_sw>();
299}

◆ create_ldpc_segmenter_tx_factory_sw()

std::shared_ptr< ldpc_segmenter_tx_factory > srsran::create_ldpc_segmenter_tx_factory_sw ( std::shared_ptr< crc_calculator_factory > crc_factory)
292{
293 return std::make_shared<ldpc_segmenter_tx_factory_sw>(std::move(crc_factory));
294}

◆ create_low_papr_sequence_collection_sw_factory()

std::shared_ptr< low_papr_sequence_collection_factory > srsran::create_low_papr_sequence_collection_sw_factory ( std::shared_ptr< low_papr_sequence_generator_factory > lpg_factory)
76{
77 return std::make_shared<low_papr_sequence_collection_sw_factory>(lpg_factory);
78}

◆ create_low_papr_sequence_generator_sw_factory()

std::shared_ptr< low_papr_sequence_generator_factory > srsran::create_low_papr_sequence_generator_sw_factory ( )
81{
82 return std::make_shared<low_papr_sequence_generator_sw_factory>();
83}

◆ create_lower_phy()

std::unique_ptr< lower_phy > srsran::create_lower_phy ( lower_phy_configuration & config)

Creates a generic lower PHY.

29{
30 // Get the maximum number of receive ports.
31 unsigned max_nof_rx_ports =
32 std::max_element(config.sectors.begin(),
33 config.sectors.end(),
35 return left.nof_rx_ports > right.nof_rx_ports;
36 })
37 ->nof_rx_ports;
38
39 // Create DFT factory. It tries to create a FFTW based factory. If FFTW library is not available, it creates a generic
40 // DFT factory.
41 std::shared_ptr<dft_processor_factory> dft_factory = create_dft_processor_factory_fftw_fast();
42 if (dft_factory == nullptr) {
44 }
45 report_fatal_error_if_not(dft_factory, "Failed to create DFT factory.");
46
47 // Create OFDM modulator factory.
49 ofdm_common_config.dft_factory = dft_factory;
50 std::shared_ptr<ofdm_modulator_factory> modulator_factory = create_ofdm_modulator_factory_generic(ofdm_common_config);
51 report_fatal_error_if_not(modulator_factory, "Failed to create OFDM modulator factory.");
52
53 // Create OFDM demodulator factory.
54 std::shared_ptr<ofdm_demodulator_factory> demodulator_factory =
56 report_fatal_error_if_not(demodulator_factory, "Failed to create OFDM demodulator factory.");
57
58 // Create OFDM PRACH demodulator factory.
59 std::shared_ptr<ofdm_prach_demodulator_factory> prach_demodulator_factory =
61
62 // Create PDxCH processor factory.
63 std::shared_ptr<pdxch_processor_factory> pdxch_proc_factory =
65 report_fatal_error_if_not(pdxch_proc_factory, "Failed to create PDxCH processor factory.");
66
67 // Create PRACH processor factory.
68 std::shared_ptr<prach_processor_factory> prach_proc_factory = create_prach_processor_factory_sw(
69 prach_demodulator_factory, *config.prach_async_executor, config.srate, max_nof_rx_ports, 1);
70 report_fatal_error_if_not(prach_proc_factory, "Failed to create PRACH processor factory.");
71
72 // Create PUxCH processor factory.
73 std::shared_ptr<puxch_processor_factory> puxch_proc_factory =
74 create_puxch_processor_factory_sw(10, demodulator_factory);
75 report_fatal_error_if_not(puxch_proc_factory, "Failed to create PUxCH processor factory.");
76
77 // Create amplitude control factory.
78 std::shared_ptr<amplitude_controller_factory> amplitude_control_factory =
80 report_fatal_error_if_not(amplitude_control_factory, "Failed to create amplitude controller factory.");
81
82 // Create Downlink processor factory.
83 std::shared_ptr<lower_phy_downlink_processor_factory> downlink_proc_factory =
84 create_downlink_processor_factory_sw(pdxch_proc_factory, amplitude_control_factory);
85 report_fatal_error_if_not(downlink_proc_factory, "Failed to create downlink processor factory.");
86
87 // Create Uplink processor factory.
88 std::shared_ptr<lower_phy_uplink_processor_factory> uplink_proc_factory =
89 create_uplink_processor_factory_sw(prach_proc_factory, puxch_proc_factory);
90 report_fatal_error_if_not(uplink_proc_factory, "Failed to create uplink processor factory.");
91
92 // Create Lower PHY factory.
93 std::shared_ptr<lower_phy_factory> lphy_factory =
94 create_lower_phy_factory_sw(downlink_proc_factory, uplink_proc_factory);
95 report_fatal_error_if_not(lphy_factory, "Failed to create lower PHY factory.");
96
97 return lphy_factory->create(config);
98}
std::shared_ptr< lower_phy_factory > create_lower_phy_factory_sw(std::shared_ptr< lower_phy_downlink_processor_factory > downlink_proc_factory, std::shared_ptr< lower_phy_uplink_processor_factory > uplink_proc_factory)
Creates a software based lower physical layer factory.
Definition lower_phy_factory.cpp:209
std::shared_ptr< ofdm_modulator_factory > create_ofdm_modulator_factory_generic(ofdm_factory_generic_configuration &config)
Creates a generic OFDM modulator factory.
Definition modulation_factories.cpp:121
std::shared_ptr< pdxch_processor_factory > create_pdxch_processor_factory_sw(unsigned request_queue_size, std::shared_ptr< ofdm_modulator_factory > ofdm_mod_factory)
Creates a software based PDxCH processor factory.
Definition pdxch_processor_factories.cpp:67
std::shared_ptr< ofdm_demodulator_factory > create_ofdm_demodulator_factory_generic(ofdm_factory_generic_configuration &config)
Creates a generic OFDM demodulator factory.
Definition modulation_factories.cpp:127
std::shared_ptr< amplitude_controller_factory > create_amplitude_controller_clipping_factory(const amplitude_controller_clipping_config &config)
Creates a clipping amplitude controller factory.
Definition amplitude_controller_factories.cpp:72
std::shared_ptr< downlink_processor_factory > create_downlink_processor_factory_sw(const downlink_processor_factory_sw_config &config)
Creates a full software based downlink processor factory.
Definition upper_phy_factories.cpp:592
std::shared_ptr< prach_processor_factory > create_prach_processor_factory_sw(std::shared_ptr< ofdm_prach_demodulator_factory > ofdm_prach_factory, task_executor &async_task_executor, sampling_rate srate, unsigned max_nof_ports, unsigned max_nof_concurrent_requests)
Creates a software based PRACH processor factory.
Definition prach_processor_factories.cpp:74
std::shared_ptr< dft_processor_factory > create_dft_processor_factory_fftw_fast(bool avoid_wisdom=false, const std::string &wisdom_filename="")
Creates an optimal DFT processor factory based on FFTW library.
Definition generic_functions_factories.h:82
std::shared_ptr< lower_phy_uplink_processor_factory > create_uplink_processor_factory_sw(std::shared_ptr< prach_processor_factory > prach_proc_factory, std::shared_ptr< puxch_processor_factory > puxch_proc_factory)
Creates a software based uplink processor factory.
Definition uplink_processor_factories.cpp:74
std::shared_ptr< ofdm_prach_demodulator_factory > create_ofdm_prach_demodulator_factory_sw(std::shared_ptr< dft_processor_factory > dft_factory, sampling_rate srate)
Creates a software generic PRACH demodulator.
Definition modulation_factories.cpp:133
std::shared_ptr< puxch_processor_factory > create_puxch_processor_factory_sw(unsigned request_queue_size, std::shared_ptr< ofdm_demodulator_factory > ofdm_demod_factory)
Creates a software based PUxCH processor factory.
Definition puxch_processor_factories.cpp:74
std::shared_ptr< dft_processor_factory > create_dft_processor_factory_generic()
Creates a DFT processor factory based on a generic Radix-2 DFT implementation.
Definition generic_functions_factories.cpp:81
std::vector< lower_phy_sector_description > sectors
Provides the sectors configuration.
Definition lower_phy_configuration.h:115
task_executor * prach_async_executor
PRACH asynchronous task executor.
Definition lower_phy_configuration.h:133
unsigned max_processing_delay_slots
Number of slots the timing handler is notified in advance of the transmission time.
Definition lower_phy_configuration.h:87
sampling_rate srate
Sampling rate.
Definition lower_phy_configuration.h:89
amplitude_controller_clipping_config amplitude_config
Amplitude control parameters, including baseband gain and clipping.
Definition lower_phy_configuration.h:113
Describes a sector configuration.
Definition lower_phy_configuration.h:42
Describes the necessary parameters for creating generic OFDM modulator and demodulator factories.
Definition modulation_factories.h:85
std::shared_ptr< dft_processor_factory > dft_factory
Provides a DFT factory.
Definition modulation_factories.h:87

◆ create_lower_phy_factory()

std::shared_ptr< lower_phy_factory > srsran::create_lower_phy_factory ( lower_phy_configuration & config,
unsigned max_nof_prach_concurrent_requests )
inline

Helper class that creates the lower PHY factory using the given configuration.

37{
38 // Get the maximum number of receive ports.
39 unsigned max_nof_rx_ports =
40 std::max_element(config.sectors.begin(),
41 config.sectors.end(),
43 return left.nof_rx_ports > right.nof_rx_ports;
44 })
45 ->nof_rx_ports;
46
47 // Create DFT factory. It tries to create a FFTW based factory. If FFTW library is not available, it creates a generic
48 // DFT factory.
49 std::shared_ptr<dft_processor_factory> dft_factory = create_dft_processor_factory_fftw_fast();
50 if (dft_factory == nullptr) {
52 }
53 report_fatal_error_if_not(dft_factory, "Failed to create DFT factory.");
54
55 // Create OFDM modulator factory.
56 ofdm_factory_generic_configuration ofdm_common_config;
57 ofdm_common_config.dft_factory = dft_factory;
58 std::shared_ptr<ofdm_modulator_factory> modulator_factory = create_ofdm_modulator_factory_generic(ofdm_common_config);
59 report_fatal_error_if_not(modulator_factory, "Failed to create OFDM modulator factory.");
60
61 // Create OFDM demodulator factory.
62 std::shared_ptr<ofdm_demodulator_factory> demodulator_factory =
63 create_ofdm_demodulator_factory_generic(ofdm_common_config);
64 report_fatal_error_if_not(demodulator_factory, "Failed to create OFDM demodulator factory.");
65
66 // Create OFDM PRACH demodulator factory.
67 std::shared_ptr<ofdm_prach_demodulator_factory> prach_demodulator_factory =
68 create_ofdm_prach_demodulator_factory_sw(dft_factory, config.srate);
69 report_fatal_error_if_not(prach_demodulator_factory, "Failed to create PRACH demodulator factory.");
70
71 // Create PDxCH processor factory.
72 std::shared_ptr<pdxch_processor_factory> pdxch_proc_factory =
73 create_pdxch_processor_factory_sw(config.max_processing_delay_slots, modulator_factory);
74 report_fatal_error_if_not(pdxch_proc_factory, "Failed to create PDxCH processor factory.");
75
76 // Create PRACH processor factory.
77 std::shared_ptr<prach_processor_factory> prach_proc_factory =
78 create_prach_processor_factory_sw(prach_demodulator_factory,
80 config.srate,
81 max_nof_rx_ports,
82 max_nof_prach_concurrent_requests);
83 report_fatal_error_if_not(prach_proc_factory, "Failed to create PRACH processor factory.");
84
85 // Create PUxCH processor factory.
86 std::shared_ptr<puxch_processor_factory> puxch_proc_factory =
87 create_puxch_processor_factory_sw(10, demodulator_factory);
88 report_fatal_error_if_not(puxch_proc_factory, "Failed to create PUxCH processor factory.");
89
90 // Create amplitude control factory.
91 std::shared_ptr<amplitude_controller_factory> amplitude_control_factory;
92 if (config.logger->debug.enabled() || config.amplitude_config.enable_clipping) {
93 amplitude_control_factory = create_amplitude_controller_clipping_factory(config.amplitude_config);
94 } else {
96 }
97 report_fatal_error_if_not(amplitude_control_factory, "Failed to create amplitude controller factory.");
98
99 // Create Downlink processor factory.
100 std::shared_ptr<lower_phy_downlink_processor_factory> downlink_proc_factory =
101 create_downlink_processor_factory_sw(pdxch_proc_factory, amplitude_control_factory);
102 report_fatal_error_if_not(downlink_proc_factory, "Failed to create downlink processor factory.");
103
104 // Create Uplink processor factory.
105 std::shared_ptr<lower_phy_uplink_processor_factory> uplink_proc_factory =
106 create_uplink_processor_factory_sw(prach_proc_factory, puxch_proc_factory);
107 report_fatal_error_if_not(uplink_proc_factory, "Failed to create uplink processor factory.");
108
109 return create_lower_phy_factory_sw(downlink_proc_factory, uplink_proc_factory);
110}
std::shared_ptr< amplitude_controller_factory > create_amplitude_controller_scaling_factory(float gain_dB_)
Creates a scaling amplitude controller factory.
Definition amplitude_controller_factories.cpp:77
bool enable_clipping
Enables or disables the clipping process.
Definition amplitude_controller_factories.h:35
float input_gain_dB
Gain to be applied before the clipping process.
Definition amplitude_controller_factories.h:37
srslog::basic_logger * logger
Amplitude control logger.
Definition lower_phy_configuration.h:77

◆ create_lower_phy_factory_sw()

std::shared_ptr< lower_phy_factory > srsran::create_lower_phy_factory_sw ( std::shared_ptr< lower_phy_downlink_processor_factory > downlink_proc_factory,
std::shared_ptr< lower_phy_uplink_processor_factory > uplink_proc_factory )

Creates a software based lower physical layer factory.

211{
212 return std::make_shared<lower_phy_factory_sw>(std::move(downlink_proc_factory), std::move(uplink_proc_factory));
213}

◆ create_mac()

std::unique_ptr< mac_interface > srsran::create_mac ( const mac_config & mac_cfg)
30{
31 std::unique_ptr<mac_interface> mac_obj = std::make_unique<mac_impl>(mac_cfg);
32 return mac_obj;
33}

◆ create_mac_pcap()

std::unique_ptr< mac_pcap > srsran::create_mac_pcap ( const std::string & filename,
mac_pcap_type pcap_type,
task_executor & backend_exec )

Creates a MAC pcap writer to a file.

130{
131 srsran_assert(not filename.empty(), "File name is empty");
132 return std::make_unique<mac_pcap_impl>(filename, pcap_type, backend_exec);
133}

◆ create_ngap_pcap()

std::unique_ptr< dlt_pcap > srsran::create_ngap_pcap ( const std::string & filename,
task_executor & backend_exec )
85{
86 return create_dlt_pcap(PCAP_NGAP_DLT, "NGAP", filename, backend_exec);
87}

◆ create_null_dlt_pcap()

std::unique_ptr< dlt_pcap > srsran::create_null_dlt_pcap ( )

Creates a layer DLT PCAP sink that writes the incoming PDUs to a pcap file.

80{
81 return std::make_unique<null_dlt_pcap>();
82}

◆ create_null_mac_pcap()

std::unique_ptr< mac_pcap > srsran::create_null_mac_pcap ( )
136{
137 return std::make_unique<null_mac_pcap>();
138}

◆ create_null_rlc_pcap()

std::unique_ptr< rlc_pcap > srsran::create_null_rlc_pcap ( )
185{
186 return std::make_unique<null_rlc_pcap>();
187}

◆ create_nzp_csi_rs_generator_factory_sw()

std::shared_ptr< nzp_csi_rs_generator_factory > srsran::create_nzp_csi_rs_generator_factory_sw ( std::shared_ptr< pseudo_random_generator_factory > prg_factory)
311{
312 return std::make_shared<nzp_csi_rs_generator_factory_sw>(std::move(prg_factory));
313}

◆ create_nzp_csi_rs_generator_pool_factory()

std::shared_ptr< nzp_csi_rs_generator_factory > srsran::create_nzp_csi_rs_generator_pool_factory ( std::shared_ptr< nzp_csi_rs_generator_factory > generator_factory,
unsigned nof_concurrent_threads )
318{
319 return std::make_shared<nzp_csi_rs_generator_pool_factory>(std::move(generator_factory), nof_concurrent_threads);
320}

◆ create_ofdm_demodulator_factory_generic()

std::shared_ptr< ofdm_demodulator_factory > srsran::create_ofdm_demodulator_factory_generic ( ofdm_factory_generic_configuration & config)

Creates a generic OFDM demodulator factory.

128{
129 return std::make_shared<ofdm_demodulator_factory_generic>(config);
130}

◆ create_ofdm_modulator_factory_generic()

std::shared_ptr< ofdm_modulator_factory > srsran::create_ofdm_modulator_factory_generic ( ofdm_factory_generic_configuration & config)

Creates a generic OFDM modulator factory.

122{
123 return std::make_shared<ofdm_modulator_factory_generic>(config);
124}

◆ create_ofdm_prach_demodulator_factory_sw()

std::shared_ptr< ofdm_prach_demodulator_factory > srsran::create_ofdm_prach_demodulator_factory_sw ( std::shared_ptr< dft_processor_factory > dft_factory,
sampling_rate srate )

Creates a software generic PRACH demodulator.

Parameters
[in]dft_factoryDFT factory.
[in]srateSampling rate.
135{
136 return std::make_shared<ofdm_prach_demodulator_factory_sw>(std::move(dft_factory), srate);
137}

◆ create_ofh_ru()

std::unique_ptr< radio_unit > srsran::create_ofh_ru ( const ru_ofh_configuration & config,
ru_ofh_dependencies && dependencies )

Returns an Open FrontHaul Radio Unit using the given configuration and dependencies.

94{
95 report_fatal_error_if_not(config.max_processing_delay_slots >= 1,
96 "max_processing_delay_slots option should be greater than or equal to 1");
97 report_fatal_error_if_not(dependencies.timing_notifier, "Invalid timing notifier");
98
100 ofh_dependencies.logger = dependencies.logger;
101 ofh_dependencies.timing_notifier = dependencies.timing_notifier;
102 ofh_dependencies.error_notifier = dependencies.error_notifier;
103
104 // Create UL Rx symbol notifier.
105 auto ul_data_notifier = std::make_shared<ru_ofh_rx_symbol_handler_impl>(*dependencies.rx_symbol_notifier);
106
107 // Create sectors.
108 for (unsigned i = 0, e = config.sector_configs.size(); i != e; ++i) {
109 const auto& sector_cfg = config.sector_configs[i];
110
111 if (sector_cfg.ru_operating_bw) {
112 report_fatal_error_if_not(
113 sector_cfg.ru_operating_bw.value() >= sector_cfg.bw,
114 "The RU operating bandwidth should be greater than or equal to the bandwidth of the cell");
115 }
116 if (sector_cfg.is_downlink_broadcast_enabled) {
117 report_fatal_error_if_not(
118 sector_cfg.dl_eaxc.size() > 1,
119 "The downlink broadcast option is only available when the number of downlink ports is greater than one");
120 }
121
122 // Create OFH sector.
123 auto sector = ofh::create_ofh_sector(
124 generate_sector_configuration(config, sector_cfg, i),
125 generate_sector_dependencies(std::move(dependencies.sector_dependencies[i]), ul_data_notifier));
126 report_fatal_error_if_not(sector, "Unable to create OFH sector");
127 ofh_dependencies.sectors.emplace_back(std::move(sector));
128
129 fmt::print("Initializing the Open Fronthaul Interface for sector#{}: ul_compr=[{},{}], dl_compr=[{},{}], "
130 "prach_compr=[{},{}], prach_cp_enabled={}, downlink_broadcast={}{}\n",
131 i,
132 to_string(sector_cfg.ul_compression_params.type),
133 sector_cfg.ul_compression_params.data_width,
134 to_string(sector_cfg.dl_compression_params.type),
135 sector_cfg.dl_compression_params.data_width,
136 to_string(sector_cfg.prach_compression_params.type),
137 sector_cfg.prach_compression_params.data_width,
138 sector_cfg.is_prach_control_plane_enabled,
139 sector_cfg.is_downlink_broadcast_enabled,
140 (sector_cfg.ru_operating_bw && sector_cfg.bw != *sector_cfg.ru_operating_bw)
141 ? fmt::format(".\nOperating a {}MHz cell over a RU with instantaneous bandwidth of {}MHz",
142 sector_cfg.bw,
143 *sector_cfg.ru_operating_bw)
144 : fmt::format(""));
145 }
146
147 // Prepare OFH controller configuration.
149 controller_cfg.cp = config.sector_configs.back().cp;
150 controller_cfg.scs = config.sector_configs.back().scs;
151 controller_cfg.gps_Alpha = config.gps_Alpha;
152 controller_cfg.gps_Beta = config.gps_Beta;
153
154 // Create OFH timing controller.
155 ofh_dependencies.timing_mngr =
156 ofh::create_ofh_timing_manager(controller_cfg, *dependencies.logger, *dependencies.rt_timing_executor);
157 report_fatal_error_if_not(ofh_dependencies.timing_mngr, "Unable to create OFH timing manager");
158
160 ru_config.nof_slot_offset_du_ru = config.max_processing_delay_slots;
161 ru_config.nof_symbols_per_slot = get_nsymb_per_slot(config.sector_configs.back().cp);
162
163 return std::make_unique<ru_ofh_impl>(ru_config, std::move(ofh_dependencies));
164}
const char * to_string(subcarrier_spacing scs)
Convert SCS to string.
Definition subcarrier_spacing.h:86
constexpr unsigned get_nsymb_per_slot(const cyclic_prefix cp)
Defines the number of OFDM symbols per slot, according to TS 38.211 Tables 4.3.2-1 and 4....
Definition cyclic_prefix.h:108
Open Fronthaul controller config.
Definition ofh_factories.h:85
cyclic_prefix cp
Cyclic prefix.
Definition ofh_factories.h:87
int gps_Beta
GPS Beta - Valid value range: [-32768, 32767].
Definition ru_ofh_configuration.h:116
unsigned max_processing_delay_slots
Number of slots the timing handler is notified in advance of the transmission time.
Definition ru_ofh_configuration.h:112
std::vector< ru_ofh_sector_configuration > sector_configs
Individual Open Fronthaul sector configurations.
Definition ru_ofh_configuration.h:107
unsigned gps_Alpha
GPS Alpha - Valid value range: [0, 1.2288e7].
Definition ru_ofh_configuration.h:114
Open Fronthaul implementation configuration.
Definition ru_ofh_impl.h:44
Open Fronthaul implementation dependencies.
Definition ru_ofh_impl.h:50

◆ create_pbch_encoder_factory_sw()

std::shared_ptr< pbch_encoder_factory > srsran::create_pbch_encoder_factory_sw ( std::shared_ptr< crc_calculator_factory > crc_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory,
std::shared_ptr< polar_factory > polar_factory )
850{
851 return std::make_shared<pbch_encoder_factory_sw>(
852 std::move(crc_factory), std::move(prg_factory), std::move(polar_factory));
853}

◆ create_pbch_modulator_factory_sw()

std::shared_ptr< pbch_modulator_factory > srsran::create_pbch_modulator_factory_sw ( std::shared_ptr< channel_modulation_factory > modulator_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory )
858{
859 return std::make_shared<pbch_modulator_factory_sw>(std::move(modulator_factory), std::move(prg_factory));
860}

◆ create_pdcch_encoder_factory_sw()

std::shared_ptr< pdcch_encoder_factory > srsran::create_pdcch_encoder_factory_sw ( std::shared_ptr< crc_calculator_factory > crc_factory,
std::shared_ptr< polar_factory > encoder_factory )
865{
866 return std::make_shared<pdcch_encoder_factory_sw>(std::move(crc_factory), std::move(encoder_factory));
867}

◆ create_pdcch_modulator_factory_sw()

std::shared_ptr< pdcch_modulator_factory > srsran::create_pdcch_modulator_factory_sw ( std::shared_ptr< channel_modulation_factory > modulator_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory )
872{
873 return std::make_shared<pdcch_modulator_factory_sw>(std::move(modulator_factory), std::move(prg_factory));
874}

◆ create_pdcch_processor_factory_sw()

std::shared_ptr< pdcch_processor_factory > srsran::create_pdcch_processor_factory_sw ( std::shared_ptr< pdcch_encoder_factory > encoder_factory,
std::shared_ptr< pdcch_modulator_factory > modulator_factory,
std::shared_ptr< dmrs_pdcch_processor_factory > dmrs_factory )
880{
881 return std::make_shared<pdcch_processor_factory_sw>(
882 std::move(encoder_factory), std::move(modulator_factory), std::move(dmrs_factory));
883}

◆ create_pdcch_processor_pool_factory()

std::shared_ptr< pdcch_processor_factory > srsran::create_pdcch_processor_pool_factory ( std::shared_ptr< pdcch_processor_factory > processor_factory,
unsigned nof_concurrent_threads )
888{
889 return std::make_shared<pdcch_processor_pool_factory>(processor_factory, nof_concurrent_threads);
890}

◆ create_pdcp_entity()

std::unique_ptr< pdcp_entity > srsran::create_pdcp_entity ( pdcp_entity_creation_message & msg)

Creates an instance of a PDCP entity.

31{
32 return std::make_unique<pdcp_entity_impl>(msg.ue_index,
33 msg.rb_id,
34 msg.config,
35 *msg.tx_lower,
36 *msg.tx_upper_cn,
37 *msg.rx_upper_dn,
38 *msg.rx_upper_cn,
39 msg.timers);
40}

◆ create_pdsch_concurrent_processor_factory_sw()

std::shared_ptr< pdsch_processor_factory > srsran::create_pdsch_concurrent_processor_factory_sw ( std::shared_ptr< crc_calculator_factory > crc_factory,
std::shared_ptr< ldpc_encoder_factory > ldpc_enc_factory,
std::shared_ptr< ldpc_rate_matcher_factory > ldpc_rm_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory,
std::shared_ptr< channel_modulation_factory > modulator_factory,
std::shared_ptr< dmrs_pdsch_processor_factory > dmrs_factory,
task_executor & executor,
unsigned nof_concurrent_threads )
929{
930 return std::make_shared<pdsch_processor_concurrent_factory_sw>(std::move(crc_factory),
931 std::move(ldpc_enc_factory),
932 std::move(ldpc_rm_factory),
933 std::move(prg_factory),
934 std::move(modulator_factory),
935 std::move(dmrs_factory),
936 executor,
937 nof_concurrent_threads);
938}

◆ create_pdsch_encoder_factory_hw()

std::shared_ptr< pdsch_encoder_factory > srsran::create_pdsch_encoder_factory_hw ( const pdsch_encoder_factory_hw_configuration & config)
900{
901 return std::make_shared<pdsch_encoder_factory_hw>(config);
902}

◆ create_pdsch_encoder_factory_sw()

std::shared_ptr< pdsch_encoder_factory > srsran::create_pdsch_encoder_factory_sw ( pdsch_encoder_factory_sw_configuration & config)
894{
895 return std::make_shared<pdsch_encoder_factory_sw>(config);
896}

◆ create_pdsch_lite_processor_factory_sw()

std::shared_ptr< pdsch_processor_factory > srsran::create_pdsch_lite_processor_factory_sw ( std::shared_ptr< ldpc_segmenter_tx_factory > segmenter_factory,
std::shared_ptr< ldpc_encoder_factory > encoder_factory,
std::shared_ptr< ldpc_rate_matcher_factory > rate_matcher_factory,
std::shared_ptr< pseudo_random_generator_factory > scrambler_factory,
std::shared_ptr< channel_modulation_factory > modulator_factory,
std::shared_ptr< dmrs_pdsch_processor_factory > dmrs_factory )
947{
948 return std::make_shared<pdsch_processor_lite_factory_sw>(std::move(segmenter_factory),
949 std::move(encoder_factory),
950 std::move(rate_matcher_factory),
951 std::move(scrambler_factory),
952 std::move(modulator_factory),
953 std::move(dmrs_factory));
954}

◆ create_pdsch_modulator_factory_sw()

std::shared_ptr< pdsch_modulator_factory > srsran::create_pdsch_modulator_factory_sw ( std::shared_ptr< channel_modulation_factory > modulator_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory )
907{
908 return std::make_shared<pdsch_modulator_factory_sw>(std::move(modulator_factory), std::move(prg_factory));
909}

◆ create_pdsch_processor_factory_sw()

std::shared_ptr< pdsch_processor_factory > srsran::create_pdsch_processor_factory_sw ( std::shared_ptr< pdsch_encoder_factory > encoder_factory,
std::shared_ptr< pdsch_modulator_factory > modulator_factory,
std::shared_ptr< dmrs_pdsch_processor_factory > dmrs_factory )
915{
916 return std::make_shared<pdsch_processor_factory_sw>(
917 std::move(encoder_factory), std::move(modulator_factory), std::move(dmrs_factory));
918}

◆ create_pdsch_processor_pool()

std::shared_ptr< pdsch_processor_factory > srsran::create_pdsch_processor_pool ( std::shared_ptr< pdsch_processor_factory > pdsch_proc_factory,
unsigned max_nof_processors )
959{
960 return std::make_shared<pdsch_processor_pool_factory>(std::move(pdsch_proc_factory), max_nof_processors);
961}

◆ create_pdxch_processor_factory_sw()

std::shared_ptr< pdxch_processor_factory > srsran::create_pdxch_processor_factory_sw ( unsigned request_queue_size,
std::shared_ptr< ofdm_modulator_factory > ofdm_mod_factory )

Creates a software based PDxCH processor factory.

Parameters
[in]request_queue_sizeNumber of PDxCH processing requests that can be enqueued.
[in]ofdm_mod_factoryOFDM modulator factory.
Returns
A PDxCH processor factory.
69{
70 return std::make_shared<pdxch_processor_factory_sw>(request_queue_size, std::move(ofdm_mod_factory));
71}

◆ create_plugin_radio_factory()

std::unique_ptr< radio_factory > srsran::create_plugin_radio_factory ( std::string driver_name)
115{
116 char* err = nullptr;
117 std::string plugin_name = "libsrsran_radio_" + driver_name + ".so";
118
120 if (dl_handle == nullptr) {
121 err = ::dlerror();
122 if (err != nullptr) {
123 fmt::print("Failed to load RF plugin {}: {}\n", plugin_name, err);
124 }
125 return nullptr;
126 }
127
128 // Create factory function prototype.
129 using create_factory_func = std::unique_ptr<radio_factory>(void);
130
131 // Load symbol.
132 auto* create_factory =
133 reinterpret_cast<create_factory_func*>(::dlsym(dl_handle, "_ZN6srsran28create_dynamic_radio_factoryEv"));
134
135 // Handle an error loading the symbol.
136 if (create_factory == nullptr) {
137 err = ::dlerror();
138 if (err != nullptr) {
139 fmt::print("Error loading symbol {}: {}\n", "create_dynamic_radio_factory", err);
140 }
141 return nullptr;
142 }
143
144 // Create factory.
145 std::unique_ptr<radio_factory> factory = (*create_factory)();
146
147 if (factory == nullptr) {
148 return nullptr;
149 }
150
151 // Create shared pointer with deleter.
152 dynamic_library_deleter deleter;
154
155 return std::make_unique<radio_factory_dynamic_wrapper>(std::move(handle), std::move(factory));
156}

◆ create_polar_factory_sw()

std::shared_ptr< polar_factory > srsran::create_polar_factory_sw ( )
307{
308 return std::make_shared<polar_factory_sw>();
309}

◆ create_port_channel_estimator_factory_sw()

std::shared_ptr< port_channel_estimator_factory > srsran::create_port_channel_estimator_factory_sw ( std::shared_ptr< dft_processor_factory > dft_f)
324{
325 return std::make_shared<port_channel_estimator_factory_sw>(std::move(dft_f));
326}

◆ create_prach_buffer_long()

std::unique_ptr< prach_buffer > srsran::create_prach_buffer_long ( unsigned max_nof_antennas,
unsigned max_nof_fd_occasions )

Creates a long PRACH sequence buffer.

Long buffers contain 839-element PRACH sequences for up to 4 OFDM symbols and a given maximum number of frequency-domain occasions.

Parameters
[in]max_nof_antennasMaximum number of antennas.
[in]max_nof_fd_occasionsMaximum number of frequency-domain occasions.
Returns
A long preamble sequence buffer.
85{
86 static constexpr interval<unsigned, true> nof_rx_ports_range(1, MAX_PORTS);
88 1, prach_constants::MAX_NOF_PRACH_FD_OCCASIONS);
89 srsran_assert(nof_rx_ports_range.contains(max_nof_antennas),
90 "The maximum number of antennas (i.e., {}) is out of range {}·",
94 "The maximum number of frequency domain occasions (i.e., {}) is out of range {}·",
97 return std::make_unique<prach_buffer_impl>(max_nof_antennas,
98 1,
100 prach_constants::LONG_SEQUENCE_MAX_NOF_SYMBOLS,
101 prach_constants::LONG_SEQUENCE_LENGTH);
102}
Representation of an interval between two numeric-types with the math representation [start,...
Definition interval.h:36

◆ create_prach_buffer_pool()

std::unique_ptr< prach_buffer_pool > srsran::create_prach_buffer_pool ( std::vector< std::unique_ptr< prach_buffer > > && elements)

Returns a pool for the given PRACH buffers.

80{
81 return std::make_unique<prach_buffer_pool_impl>(std::move(elements));
82}

◆ create_prach_buffer_short()

std::unique_ptr< prach_buffer > srsran::create_prach_buffer_short ( unsigned max_nof_antennas,
unsigned max_nof_td_occasions,
unsigned max_nof_fd_occasions )

Creates a short PRACH sequence buffer.

Short buffers contain 139-element PRACH sequences for up to prach_constants::SHORT_SEQUENCE_MAX_NOF_SYMBOLS symbols per occasion.

Parameters
[in]max_nof_antennasMaximum number of antennas.
[in]max_nof_td_occasionsMaximum number of time-domain occasions.
[in]max_nof_fd_occasionsMaximum number of frequency-domain occasions.
Returns
A short preamble sequence buffer containing PRACH sequence buffers for the number of selected occasions.
107{
108 static constexpr interval<unsigned, true> nof_rx_ports_range(1, MAX_PORTS);
110 1, prach_constants::MAX_NOF_PRACH_TD_OCCASIONS);
112 1, prach_constants::MAX_NOF_PRACH_FD_OCCASIONS);
113 srsran_assert(nof_rx_ports_range.contains(max_nof_antennas),
114 "The maximum number of antennas (i.e., {}) is out of range {}·",
118 "The maximum number of time domain occasions (i.e., {}) is out of range {}·",
122 "The maximum number of frequency domain occasions (i.e., {}) is out of range {}·",
125 return std::make_unique<prach_buffer_impl>(max_nof_antennas,
128 prach_constants::SHORT_SEQUENCE_MAX_NOF_SYMBOLS,
129 prach_constants::SHORT_SEQUENCE_LENGTH);
130}

◆ create_prach_detector_factory_sw()

std::shared_ptr< prach_detector_factory > srsran::create_prach_detector_factory_sw ( std::shared_ptr< dft_processor_factory > dft_factory,
std::shared_ptr< prach_generator_factory > prach_gen_factory,
const prach_detector_factory_sw_configuration & config = {} )
967{
968 return std::make_shared<prach_detector_factory_sw>(std::move(dft_factory), std::move(prach_gen_factory), config);
969}

◆ create_prach_detector_pool_factory()

std::shared_ptr< prach_detector_factory > srsran::create_prach_detector_pool_factory ( std::shared_ptr< prach_detector_factory > factory,
unsigned nof_concurrent_threads )
974{
975 return std::make_shared<prach_detector_pool_factory>(std::move(factory), nof_concurrent_threads);
976}

◆ create_prach_generator_factory_sw()

std::shared_ptr< prach_generator_factory > srsran::create_prach_generator_factory_sw ( )
997{
998 return std::make_shared<prach_generator_factory_sw>();
999}

◆ create_prach_processor_factory_sw()

std::shared_ptr< prach_processor_factory > srsran::create_prach_processor_factory_sw ( std::shared_ptr< ofdm_prach_demodulator_factory > ofdm_prach_factory,
task_executor & async_task_executor,
sampling_rate srate,
unsigned max_nof_ports,
unsigned max_nof_concurrent_requests )

Creates a software based PRACH processor factory.

Parameters
ofdm_prach_factoryOFDM demodulator for PRACH factory.
async_task_executorTask executor for demodulating PRACH asynchronously.
srateSampling rate.
max_nof_portsMaximum number of PRACH reception ports.
max_nof_concurrent_requestsMaximum number of concurrent PRACH processing requests.
Returns
A valid PRACH processor factory.
79{
80 return std::make_shared<prach_processor_factory_sw>(
81 ofdm_prach_factory, async_task_executor, srate, max_nof_ports, max_nof_concurrent_requests);
82}

◆ create_pseudo_random_generator_sw_factory()

std::shared_ptr< pseudo_random_generator_factory > srsran::create_pseudo_random_generator_sw_factory ( )
86{
87 return std::make_shared<pseudo_random_generator_sw_factory>();
88}

◆ create_pss_processor_factory_sw()

std::shared_ptr< pss_processor_factory > srsran::create_pss_processor_factory_sw ( )
329{
330 return std::make_shared<pss_processor_factory_sw>();
331}

◆ create_pucch_demodulator_factory_sw()

std::shared_ptr< pucch_demodulator_factory > srsran::create_pucch_demodulator_factory_sw ( std::shared_ptr< channel_equalizer_factory > equalizer_factory,
std::shared_ptr< channel_modulation_factory > demodulation_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory )
1005{
1006 return std::make_shared<pucch_demodulator_factory_sw>(
1007 std::move(equalizer_factory), std::move(demodulation_factory), std::move(prg_factory));
1008}

◆ create_pucch_detector_factory_sw()

std::shared_ptr< pucch_detector_factory > srsran::create_pucch_detector_factory_sw ( std::shared_ptr< low_papr_sequence_collection_factory > lpcf,
std::shared_ptr< pseudo_random_generator_factory > prgf,
std::shared_ptr< channel_equalizer_factory > eqzrf )
1014{
1015 return std::make_shared<pucch_detector_factory_sw>(std::move(lpcf), std::move(prgf), std::move(eqzrf));
1016}

◆ create_pucch_processor_factory_sw()

std::shared_ptr< pucch_processor_factory > srsran::create_pucch_processor_factory_sw ( std::shared_ptr< dmrs_pucch_estimator_factory > dmrs_factory,
std::shared_ptr< pucch_detector_factory > detector_factory,
std::shared_ptr< pucch_demodulator_factory > demodulator_factory,
std::shared_ptr< uci_decoder_factory > decoder_factory,
const channel_estimate::channel_estimate_dimensions & channel_estimate_dimensions )
984{
985 return std::make_shared<pucch_processor_factory_sw>(
986 dmrs_factory, detector_factory, demodulator_factory, decoder_factory, channel_estimate_dimensions);
987}

◆ create_pucch_processor_pool_factory()

std::shared_ptr< pucch_processor_factory > srsran::create_pucch_processor_pool_factory ( std::shared_ptr< pucch_processor_factory > factory,
unsigned nof_concurrent_threads )
992{
993 return std::make_shared<pucch_processor_pool_factory>(std::move(factory), nof_concurrent_threads);
994}

◆ create_pusch_decoder_factory_hw()

std::shared_ptr< pusch_decoder_factory > srsran::create_pusch_decoder_factory_hw ( const pusch_decoder_factory_hw_configuration & config)
287{
288 return std::make_shared<pusch_decoder_factory_hw>(config);
289}

◆ create_pusch_decoder_factory_sw()

std::shared_ptr< pusch_decoder_factory > srsran::create_pusch_decoder_factory_sw ( pusch_decoder_factory_sw_configuration config)
281{
282 return std::make_shared<pusch_decoder_factory_generic>(std::move(config));
283}

◆ create_pusch_demodulator_factory_sw()

std::shared_ptr< pusch_demodulator_factory > srsran::create_pusch_demodulator_factory_sw ( std::shared_ptr< channel_equalizer_factory > equalizer_factory,
std::shared_ptr< channel_modulation_factory > demodulation_factory,
std::shared_ptr< pseudo_random_generator_factory > prg_factory,
bool enable_evm = false,
bool enable_post_eq_sinr = false )
297{
298 return std::make_shared<pusch_demodulator_factory_generic>(std::move(equalizer_factory),
299 std::move(demodulation_factory),
300 std::move(prg_factory),
301 enable_evm,
302 enable_post_eq_sinr);
303}

◆ create_pusch_processor_factory_sw()

std::shared_ptr< pusch_processor_factory > srsran::create_pusch_processor_factory_sw ( pusch_processor_factory_sw_configuration & config)
307{
308 return std::make_shared<pusch_processor_factory_generic>(config);
309}

◆ create_pusch_processor_pool()

std::shared_ptr< pusch_processor_factory > srsran::create_pusch_processor_pool ( std::shared_ptr< pusch_processor_factory > factory,
unsigned max_nof_processors )
313{
314 return std::make_shared<pusch_processor_pool_factory>(std::move(factory), max_nof_processors);
315}

◆ create_puxch_processor_factory_sw()

std::shared_ptr< puxch_processor_factory > srsran::create_puxch_processor_factory_sw ( unsigned request_queue_size,
std::shared_ptr< ofdm_demodulator_factory > ofdm_demod_factory )

Creates a software based PUxCH processor factory.

Parameters
request_queue_sizeNumber of PUxCH processing requests that can be enqueued.
ofdm_demod_factoryOFDM demodulator factory.
Returns
A PUxCH processor factory.
76{
77 return std::make_shared<puxch_processor_factory_sw>(request_queue_size, std::move(ofdm_demod_factory));
78}

◆ create_radio_factory()

std::unique_ptr< radio_factory > srsran::create_radio_factory ( std::string driver_name)

Creates a radio factory by selecting an existent factory or loading the appropriate dynamic library.

By default, this function creates a radio factory from the statically linked ones (i.e., uhd).

If the driver_name does not match with one of the statically linked factories, this function dynamically loads a shared library corresponding to the specified driver name and retrieves the factory creation function from it.

The naming convention for the shared library is as follows: if the driver name is custom, the library name is expected to be libsrsran_radio_custom.so. The factory creation function within the dynamic library is expected to implement the function prototype create_dynamic_radio_factory.

Ensure that the LD_LIBRARY_PATH environment variable includes the path where the dynamic libraries are located.

Parameters
[in]driver_nameSelects the type of radio factory for example uhd or zmq.
Returns
A valid radio factory if the factory is successfully created, otherwise nullptr.
77{
78 // Convert driver name to lower case.
79 for (char& c : driver_name) {
80 c = std::tolower(c);
81 }
82
83 // Iterate all available driver names.
84 for (const radio_factory_entry& entry : radio_factory_available_factories) {
85 if (entry.name == driver_name) {
86 return entry.make();
87 }
88 }
89
90 // Try creating a plugin radio factory.
91 auto factory = create_plugin_radio_factory(driver_name);
92 if (factory) {
93 return factory;
94 }
95
96 // No match, print available factories.
97 fmt::print("Factory for radio type {} not found. Make sure to select a valid type.\n", driver_name);
98
99 return nullptr;
100}

◆ create_resource_grid_factory()

std::shared_ptr< resource_grid_factory > srsran::create_resource_grid_factory ( std::shared_ptr< channel_precoder_factory > precoder_factory)

Creates and returns a resource grid factory that instantiates resource grids.

Parameters
[in]precoder_factoryChannel precoder factory.
Returns
A pointer to a resource grid factory.
139{
140 return std::make_shared<resource_grid_factory_impl>(std::move(precoder_factory));
141}

◆ create_resource_grid_mapper()

std::unique_ptr< resource_grid_mapper > srsran::create_resource_grid_mapper ( unsigned nof_ports,
unsigned nof_subc,
srsran::resource_grid_writer & writer )

Creates a resource grid mapper with an ideal precoding.

222{
223 return std::make_unique<resource_grid_mapper_impl>(
224 nof_ports, nof_subc, writer, std::make_unique<channel_precoder_dummy>());
225}

◆ create_rlc_entity()

std::unique_ptr< rlc_entity > srsran::create_rlc_entity ( const rlc_entity_creation_message & msg)

Creates an instance of a RLC bearer.

31{
32 switch (msg.config.mode) {
33 case rlc_mode::tm:
34 return std::make_unique<rlc_tm_entity>(msg.du_index,
35 msg.ue_index,
36 msg.rb_id,
37 msg.config.tm,
38 msg.config.metrics_period,
39 msg.rlc_metrics_notif,
40 *msg.rx_upper_dn,
41 *msg.tx_upper_dn,
42 *msg.tx_upper_cn,
43 *msg.tx_lower_dn,
44 *msg.timers,
45 *msg.pcell_executor,
46 *msg.ue_executor,
47 *msg.pcap_writer);
48 case rlc_mode::um_unidir_dl:
49 case rlc_mode::um_unidir_ul:
50 case rlc_mode::um_bidir:
51 return std::make_unique<rlc_um_entity>(msg.du_index,
52 msg.ue_index,
53 msg.rb_id,
54 msg.config.um,
55 msg.config.metrics_period,
56 msg.rlc_metrics_notif,
57 *msg.rx_upper_dn,
58 *msg.tx_upper_dn,
59 *msg.tx_upper_cn,
60 *msg.tx_lower_dn,
61 *msg.timers,
62 *msg.pcell_executor,
63 *msg.ue_executor,
64 *msg.pcap_writer);
65 case rlc_mode::am:
66 return std::make_unique<rlc_am_entity>(msg.du_index,
67 msg.ue_index,
68 msg.rb_id,
69 msg.config.am,
70 msg.config.metrics_period,
71 msg.rlc_metrics_notif,
72 *msg.rx_upper_dn,
73 *msg.tx_upper_dn,
74 *msg.tx_upper_cn,
75 *msg.tx_lower_dn,
76 *msg.timers,
77 *msg.pcell_executor,
78 *msg.ue_executor,
79 *msg.pcap_writer);
80 default:
81 srsran_terminate("RLC mode not supported.");
82 }
83 return nullptr;
84}

◆ create_rlc_pcap()

std::unique_ptr< rlc_pcap > srsran::create_rlc_pcap ( const std::string & filename,
task_executor & backend_exec,
bool srb_pdus_enabled = true,
bool drb_pdus_enabled = true )

Creates an RLC pcap writer to a file.

179{
180 srsran_assert(not filename.empty(), "File name is empty");
181 return std::make_unique<rlc_pcap_impl>(filename, srb_pdus_enabled, drb_pdus_enabled, backend_exec);
182}

◆ create_rx_buffer_pool()

std::unique_ptr< rx_buffer_pool_controller > srsran::create_rx_buffer_pool ( const rx_buffer_pool_config & config)

Creates a receive buffer pool.

163{
164 return std::make_unique<rx_buffer_pool_impl>(config);
165}

◆ create_scheduler()

std::unique_ptr< mac_scheduler > srsran::create_scheduler ( const scheduler_config & sched_cfg)

Create L2 scheduler object.

29{
30 return std::make_unique<scheduler_impl>(sched_cfg);
31}

◆ create_scheduler_strategy()

std::unique_ptr< scheduler_policy > srsran::create_scheduler_strategy ( const scheduler_strategy_params & params)
29{
30 return std::make_unique<scheduler_time_rr>();
31}

◆ create_sctp_network_gateway()

std::unique_ptr< sctp_network_gateway > srsran::create_sctp_network_gateway ( sctp_network_gateway_creation_message msg)

Creates an instance of an network gateway.

30{
31 return std::make_unique<sctp_network_gateway_impl>(msg.config, msg.ctrl_notifier, msg.data_notifier);
32}

◆ create_short_block_detector_factory_sw()

std::shared_ptr< short_block_detector_factory > srsran::create_short_block_detector_factory_sw ( )
312{
313 return std::make_unique<short_block_detector_factory_sw>();
314}

◆ create_short_block_encoder()

std::unique_ptr< short_block_encoder > srsran::create_short_block_encoder ( )
152{
153 return std::make_unique<short_block_encoder_impl>();
154}

◆ create_ssb_processor_factory_sw()

std::shared_ptr< ssb_processor_factory > srsran::create_ssb_processor_factory_sw ( ssb_processor_factory_sw_configuration & config)
1020{
1021 return std::make_shared<ssb_processor_factory_sw>(config);
1022}

◆ create_ssb_processor_pool_factory()

std::shared_ptr< ssb_processor_factory > srsran::create_ssb_processor_pool_factory ( std::shared_ptr< ssb_processor_factory > processor_factory,
unsigned nof_concurrent_threads )
1027{
1028 return std::make_shared<ssb_processor_pool_factory>(processor_factory, nof_concurrent_threads);
1029}

◆ create_sss_processor_factory_sw()

std::shared_ptr< sss_processor_factory > srsran::create_sss_processor_factory_sw ( )
334{
335 return std::make_shared<sss_processor_factory_sw>();
336}

◆ create_uci_decoder_factory_generic()

std::shared_ptr< uci_decoder_factory > srsran::create_uci_decoder_factory_generic ( std::shared_ptr< short_block_detector_factory > decoder_factory,
std::shared_ptr< polar_factory > polar_factory,
std::shared_ptr< crc_calculator_factory > crc_calc_factory )
67{
68 return std::make_shared<uci_decoder_factory_generic>(
69 std::move(decoder_factory), std::move(polar_factory), std::move(crc_calc_factory));
70}

◆ create_udp_network_gateway()

std::unique_ptr< udp_network_gateway > srsran::create_udp_network_gateway ( udp_network_gateway_creation_message msg)

Creates an instance of an network gateway.

29{
30 return std::make_unique<udp_network_gateway_impl>(msg.config, msg.data_notifier, msg.io_tx_executor);
31}

◆ create_ulsch_demultiplex_factory_sw()

std::shared_ptr< ulsch_demultiplex_factory > srsran::create_ulsch_demultiplex_factory_sw ( )
323{
324 return std::make_shared<ulsch_demultiplex_factory_sw>();
325}

◆ create_uplink_processor_factory_sw()

std::shared_ptr< lower_phy_uplink_processor_factory > srsran::create_uplink_processor_factory_sw ( std::shared_ptr< prach_processor_factory > prach_proc_factory,
std::shared_ptr< puxch_processor_factory > puxch_proc_factory )

Creates a software based uplink processor factory.

76{
77 return std::make_shared<lower_phy_uplink_processor_factory_sw>(std::move(prach_proc_factory),
78 std::move(puxch_proc_factory));
79}

◆ create_uplink_processor_pool()

std::unique_ptr< uplink_processor_pool > srsran::create_uplink_processor_pool ( uplink_processor_pool_config config)

Creates and returns an uplink processor pool.

851{
852 // Convert from pool config to pool_impl config.
854 ul_processors.num_sectors = config.num_sectors;
855
856 for (auto& proc : config.ul_processors) {
857 ul_processors.procs.push_back({proc.sector, proc.scs, std::move(proc.procs)});
858 }
859
860 return std::make_unique<uplink_processor_pool_impl>(std::move(ul_processors));
861}

◆ create_upper_phy()

std::unique_ptr< upper_phy > srsran::create_upper_phy ( const upper_phy_params & params,
upper_phy_rg_gateway * rg_gateway,
span< task_executor * > dl_executors,
task_executor * ul_executor,
upper_phy_rx_symbol_request_notifier * rx_symbol_request_notifier )
34{
37 dl_proc_config.crc_calculator_type = "auto";
38 dl_proc_config.nof_concurrent_threads = 1;
39
40 // Create downlink processor factory.
41 std::shared_ptr<downlink_processor_factory> dl_proc_factory = create_downlink_processor_factory_sw(dl_proc_config);
42 report_fatal_error_if_not(dl_proc_factory, "Invalid DL processor factory.");
43
44 // Create channel precoder factory.
45 std::shared_ptr<channel_precoder_factory> precoding_factory = create_channel_precoder_factory("auto");
46 report_fatal_error_if_not(precoding_factory, "Invalid channel precoder factory.");
47
48 // Create resource grid factory.
49 std::shared_ptr<resource_grid_factory> rg_factory = create_resource_grid_factory(precoding_factory);
50 report_fatal_error_if_not(rg_factory, "Invalid resource grid factory.");
51
52 // Create upper PHY factory.
53 std::unique_ptr<upper_phy_factory> upper_phy_factory = create_upper_phy_factory(dl_proc_factory, rg_factory);
54 report_fatal_error_if_not(upper_phy_factory, "Invalid upper PHY factory.");
55
56 static constexpr unsigned dl_pipeline_depth = 8;
57 static constexpr unsigned ul_pipeline_depth = 8;
58 static constexpr unsigned prach_pipeline_depth = 1;
59
61 upper_config.log_level = params.log_level;
62 upper_config.enable_logging_broadcast = (params.log_level != srslog::basic_levels::none);
63 upper_config.rx_symbol_printer_filename.clear();
64 upper_config.logger_max_hex_size = 64;
65 upper_config.pusch_sinr_calc_method = channel_state_information::sinr_type::channel_estimator;
66 upper_config.sector_id = 0;
67 upper_config.nof_tx_ports = 1;
68 upper_config.nof_rx_ports = 1;
69 upper_config.ldpc_decoder_iterations = 6;
70 upper_config.ldpc_decoder_early_stop = true;
71
72 unsigned nof_slots_per_subframe = get_nof_slots_per_subframe(params.scs);
73 upper_config.nof_dl_rg = dl_pipeline_depth * nof_slots_per_subframe;
74 upper_config.dl_rg_expire_timeout_slots = upper_config.nof_dl_rg - 2;
75 upper_config.nof_dl_processors = upper_config.nof_dl_rg;
77 upper_config.max_ul_thread_concurrency = 4;
78 upper_config.max_pusch_concurrency = 1;
79 upper_config.nof_pusch_decoder_threads = 1;
80 upper_config.nof_prach_buffer = prach_pipeline_depth * nof_slots_per_subframe;
81 upper_config.max_nof_td_prach_occasions = 1;
82 upper_config.max_nof_fd_prach_occasions = 1;
83 upper_config.is_prach_long_format = true;
84
85 upper_config.active_scs = {};
86 upper_config.active_scs[to_numerology_value(params.scs)] = true;
87
88 unsigned bw_rb = band_helper::get_n_rbs_from_bw(params.channel_bw_mhz, params.scs, frequency_range::FR1);
89 upper_config.dl_bw_rb = bw_rb;
90 upper_config.ul_bw_rb = bw_rb;
91
92 upper_config.rx_buffer_config.nof_buffers = upper_config.nof_dl_rg;
93 upper_config.rx_buffer_config.nof_codeblocks = 128;
94 upper_config.rx_buffer_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE;
95 upper_config.rx_buffer_config.expire_timeout_slots = 100 * nof_slots_per_subframe;
96 upper_config.rx_buffer_config.external_soft_bits = false;
97
98 upper_config.dl_executors = dl_executors;
99 upper_config.rg_gateway = rg_gateway;
100 upper_config.pucch_executor = ul_executor;
101 upper_config.pusch_executor = ul_executor;
102 upper_config.pusch_decoder_executor = nullptr;
103 upper_config.prach_executor = ul_executor;
104 upper_config.rx_symbol_request_notifier = rx_symbol_request_notifier;
105 upper_config.crc_calculator_type = "auto";
106 upper_config.ldpc_rate_dematcher_type = "auto";
107 upper_config.ldpc_decoder_type = "auto";
108
110}
Factory that builds upper PHY objects.
Definition upper_phy_factories.h:330
virtual std::unique_ptr< upper_phy > create(const upper_phy_config &config)=0
Creates and returns an upper PHY object.
constexpr unsigned to_numerology_value(subcarrier_spacing scs)
Convert SCS to numerology index ( ).
Definition subcarrier_spacing.h:50
constexpr unsigned get_nof_slots_per_subframe(subcarrier_spacing scs)
Calculates number of slots per subframe.
Definition subcarrier_spacing.h:106
std::shared_ptr< resource_grid_factory > create_resource_grid_factory(std::shared_ptr< channel_precoder_factory > precoder_factory)
Creates and returns a resource grid factory that instantiates resource grids.
Definition support_factories.cpp:138
std::shared_ptr< channel_precoder_factory > create_channel_precoder_factory(const std::string &precoder_type)
Creates and returns a channel precoder factory.
Definition precoding_factories.cpp:77
std::unique_ptr< upper_phy_factory > create_upper_phy_factory(std::shared_ptr< downlink_processor_factory > downlink_proc_factory, std::shared_ptr< resource_grid_factory > rg_factory)
Creates and returns an upper PHY factory.
Definition upper_phy_factories.cpp:877
Upper PHY configuration parameters used to create a new upper PHY object.
Definition upper_phy_factories.h:220
srslog::basic_levels log_level
Logging level.
Definition upper_phy_factories.h:224

◆ create_upper_phy_factory()

std::unique_ptr< upper_phy_factory > srsran::create_upper_phy_factory ( std::shared_ptr< downlink_processor_factory > downlink_proc_factory,
std::shared_ptr< resource_grid_factory > rg_factory )

Creates and returns an upper PHY factory.

879{
880 return std::make_unique<upper_phy_factory_impl>(downlink_proc_factory, rg_factory);
881}

◆ create_yaml_config_parser()

std::unique_ptr< CLI::Config > srsran::create_yaml_config_parser ( )

Creates an instance of a YAML configuration parser.

176{
177 return std::make_unique<yaml_config_parser>();
178}

◆ csi_report_get_nof_csi_rs_antenna_ports()

unsigned srsran::csi_report_get_nof_csi_rs_antenna_ports ( pmi_codebook_type pmi_codebook)
inline

Gets the number of CSI-RS antenna ports from the PMI codebook type.

31{
32 switch (pmi_codebook) {
33 case pmi_codebook_type::one:
34 return 1;
35 case pmi_codebook_type::two:
36 return 2;
37 case pmi_codebook_type::typeI_single_panel_4ports_mode1:
38 return 4;
39 case pmi_codebook_type::other:
40 default:
41 return 0;
42 }
43}

◆ csi_report_get_size_pmi()

unsigned srsran::csi_report_get_size_pmi ( pmi_codebook_type codebook,
csi_report_data::ri_type ri )

Gets the PMI field bit-width.

188{
190 switch (codebook) {
191 case pmi_codebook_type::two:
192 return csi_report_get_size_pmi_two_port(ri);
193 case pmi_codebook_type::typeI_single_panel_4ports_mode1:
194 return csi_report_get_size_pmi_typeI_single_panel_4ports_mode1(nof_csi_rs_antenna_ports, ri);
195 case pmi_codebook_type::one:
196 case pmi_codebook_type::other:
197 default:
198 return 0;
199 }
200}
unsigned csi_report_get_nof_csi_rs_antenna_ports(pmi_codebook_type pmi_codebook)
Gets the number of CSI-RS antenna ports from the PMI codebook type.
Definition csi_report_on_puxch_utils.h:30

◆ csi_report_periodicity_to_uint()

unsigned srsran::csi_report_periodicity_to_uint ( csi_report_periodicity period)
inline
60{
61 return static_cast<unsigned>(period);
62}

◆ csi_report_unpack_pmi()

csi_report_pmi srsran::csi_report_unpack_pmi ( const csi_report_packed & packed,
pmi_codebook_type codebook,
csi_report_data::ri_type ri )

Unpacks PMI.

258{
260
261 switch (codebook) {
262 case pmi_codebook_type::two:
263 return csi_report_unpack_pmi_two_antenna_port(packed);
264 case pmi_codebook_type::typeI_single_panel_4ports_mode1:
265 return csi_report_unpack_pmi_typeI_single_panel_4ports_mode1(packed, nof_csi_rs_antenna_ports, ri);
266 case pmi_codebook_type::one:
267 case pmi_codebook_type::other:
268 default:
269 return {};
270 }
271}

◆ csi_report_unpack_pucch()

csi_report_data srsran::csi_report_unpack_pucch ( const csi_report_packed & packed,
const csi_report_configuration & config )

Unpacks Channel State Information (CSI) report multiplexed in PUCCH.

The unpacking is CSI report unpacking defined in TS38.212 Section 6.3.1.1.2.

Parameters
[in]packedPacked CSI report.
[in]configCSI report configuration.
Returns
The CSI report data.
226{
227 srsran_assert(config.pmi_codebook != pmi_codebook_type::other, "Unsupported PMI codebook type.");
228
229 srsran_assert((config.pmi_codebook == pmi_codebook_type::one) ||
231 "The RI restriction set size, i.e., {}, is smaller than the number of CSI-RS ports, i.e., {}.",
232 config.ri_restriction.size(),
234
235 srsran_assert(
236 (config.pmi_codebook == pmi_codebook_type::one) ||
237 (config.ri_restriction.find_highest() <
238 static_cast<int>(csi_report_get_nof_csi_rs_antenna_ports(config.pmi_codebook))),
239 "The RI restriction set, i.e., {}, allows higher rank values than the number of CSI-RS ports, i.e., {}.",
240 config.ri_restriction,
242
243 // Select unpacking depending on the CSI report quantities.
244 switch (config.quantities) {
245 case csi_report_quantities::cri_ri_pmi_cqi:
246 case csi_report_quantities::cri_ri_cqi:
247 case csi_report_quantities::cri_ri_li_pmi_cqi:
248 return csi_report_unpack_pucch_cri_ri_li_pmi_cqi(packed, config);
249 case csi_report_quantities::other:
250 default:
251 report_error("Invalid CSI report quantities.");
252 }
253}
int find_highest(bool value=true) const noexcept
Finds the highest bit with value set to the value passed as argument.
Definition bounded_bitset.h:813
void report_error(const char *reason_fmt, Args &&... args) noexcept
Reports an error and closes the application gracefully. This function is intended to be used for erro...
Definition error_handling.h:45
csi_report_quantities quantities
Select CSI report quantities.
Definition csi_report_configuration.h:71
ri_restriction_type ri_restriction
Set to true the bits in position to enable RI reporting for .
Definition csi_report_configuration.h:69

◆ csi_report_unpack_pusch() [1/2]

csi_report_data srsran::csi_report_unpack_pusch ( const csi_report_packed & csi1_packed,
const csi_report_configuration & config )

Unpacks Channel State Information (CSI) report multiplexed in PUSCH containing CSI Part 1 only.

The CSI report is defined in TS38.212 Section 6.3.2.1.2.

Parameters
[in]csi1_packedPacked CSI Part 1 report.
[in]configCSI report configuration.
Returns
The CSI report data.
321{
323}
bounded_bitset< csi_report_max_size.value(), false > csi_report_packed
Packed Channel State Information (CSI) report data type.
Definition csi_report_packed.h:37
csi_report_data csi_report_unpack_pusch(const csi_report_packed &csi1_packed, const csi_report_packed &csi2_packed, const csi_report_configuration &config)
Unpacks a Channel State Information (CSI) report multiplexed in PUSCH containing CSI Part 1 and Part ...
Definition csi_report_on_pusch_helpers.cpp:280

◆ csi_report_unpack_pusch() [2/2]

csi_report_data srsran::csi_report_unpack_pusch ( const csi_report_packed & csi1_packed,
const csi_report_packed & csi2_packed,
const csi_report_configuration & config )

Unpacks a Channel State Information (CSI) report multiplexed in PUSCH containing CSI Part 1 and Part 2.

The CSI report is defined in TS38.212 Section 6.3.2.1.2.

Parameters
[in]csi1_packedPacked CSI Part 1 report.
[in]csi2_packedPacked CSI Part 2 report.
[in]configCSI report configuration.
Returns
The CSI report data.
283{
284 srsran_assert(config.pmi_codebook != pmi_codebook_type::other, "Unsupported PMI codebook type.");
285
286 srsran_assert((config.pmi_codebook == pmi_codebook_type::one) ||
288 "The RI restriction set size, i.e., {}, is smaller than the number of CSI-RS ports, i.e., {}.",
289 config.ri_restriction.size(),
291
292 srsran_assert(
293 (config.pmi_codebook == pmi_codebook_type::one) ||
294 (config.ri_restriction.find_highest() <
295 static_cast<int>(csi_report_get_nof_csi_rs_antenna_ports(config.pmi_codebook))),
296 "The RI restriction set, i.e., {}, allows higher rank values than the number of CSI-RS ports, i.e., {}.",
297 config.ri_restriction,
299
300 // Assert that CSI Part 2 payload is present if it is required.
301 srsran_assert(((config.pmi_codebook == pmi_codebook_type::one) ||
302 ((config.quantities != csi_report_quantities::cri_ri_li_pmi_cqi) &&
303 (config.quantities != csi_report_quantities::cri_ri_pmi_cqi))) ||
304 !csi2_packed.empty(),
305 "PUSCH CSI Part 2 is required for more than one CSI-RS port when PMI is reported.");
306
307 // Select unpacking depending on the CSI report quantities.
308 switch (config.quantities) {
309 case csi_report_quantities::cri_ri_pmi_cqi:
310 case csi_report_quantities::cri_ri_cqi:
311 case csi_report_quantities::cri_ri_li_pmi_cqi:
312 return unpack_pusch_csi_cri_ri_li_pmi_cqi(csi1_packed, csi2_packed, config);
313 case csi_report_quantities::other:
314 default:
315 report_error("Invalid CSI report quantities.");
316 }
317}

◆ csi_report_unpack_ri()

csi_report_data::ri_type srsran::csi_report_unpack_ri ( const csi_report_packed & ri_packed,
const ri_restriction_type & ri_restriction )

Unpacks RI as per TS38.212 Section 6.3.1.1.2. and TS38.214 Section 5.2.2.2.1.

275{
276 unsigned ri = 1;
277 if (!ri_packed.empty()) {
278 ri = ri_packed.extract(0, ri_packed.size());
279
280 srsran_assert(ri < ri_restriction.count(),
281 "Packed RI, i.e., {}, is out of bounds given the number of allowed rank values, i.e., {}.",
282 ri,
283 ri_restriction.count());
284
285 ri = ri_restriction.get_bit_positions()[ri] + 1;
286 }
287 return ri;
288}
static_vector< size_t, N > get_bit_positions(bool value=true) const
Generates a list of bit positions corresponding to the information bits set to one or zero.
Definition bounded_bitset.h:1063

◆ csi_report_unpack_wideband_cqi()

csi_report_data::wideband_cqi_type srsran::csi_report_unpack_wideband_cqi ( csi_report_packed packed)

Unpacks wideband CQI.

203{
204 srsran_assert(packed.size() == 4, "Packed size (i.e., {}) must be 4 bits.", packed.size());
205 return packed.extract(0, 4);
206}

◆ csi_resource_periodicity_options()

const span< const csi_resource_periodicity > srsran::csi_resource_periodicity_options ( )
inline
97{
98 const static std::array<csi_resource_periodicity, 13> list{csi_resource_periodicity::slots4,
99 csi_resource_periodicity::slots5,
100 csi_resource_periodicity::slots8,
101 csi_resource_periodicity::slots10,
102 csi_resource_periodicity::slots16,
103 csi_resource_periodicity::slots20,
104 csi_resource_periodicity::slots32,
105 csi_resource_periodicity::slots40,
106 csi_resource_periodicity::slots64,
107 csi_resource_periodicity::slots80,
108 csi_resource_periodicity::slots160,
109 csi_resource_periodicity::slots320,
110 csi_resource_periodicity::slots640};
111 return span<const csi_resource_periodicity>{list};
112}

◆ csi_resource_periodicity_to_uint()

unsigned srsran::csi_resource_periodicity_to_uint ( csi_resource_periodicity val)
inline
92{
93 return static_cast<unsigned>(val);
94}

◆ dci_0_0_c_rnti_pack()

dci_payload srsran::dci_0_0_c_rnti_pack ( const dci_0_0_c_rnti_configuration & config)

Packs a DCI format 0_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI.

866{
867 srsran_assert(config.payload_size.total.value() >= 12, "DCI payloads must be at least 12 bit long");
868
869 dci_payload payload;
871
872 // Identifier for DCI formats - 1 bit. This field is always 0, indicating an UL DCI format.
873 payload.push_back(0x00U, 1);
874
875 if (config.frequency_hopping_flag) {
876 // Assert that the number of bits used to pack the frequency hopping offset is valid.
877 srsran_assert((config.N_ul_hop == 1) || (config.N_ul_hop == 2),
878 "DCI frequency offset number of bits must be either 1 or 2");
879
880 // Assert that the frequency resource field has enough bits to include the frequency hopping offset.
881 srsran_assert(config.N_ul_hop < frequency_resource_nof_bits.value(),
882 "The frequency resource field must have enough bits to hold the frequency hopping offset");
883
884 // Assert that the frequency hopping offset can be packed with the allocated bits.
885 srsran_assert(config.hopping_offset < (1U << config.N_ul_hop),
886 "DCI frequency offset value ({}) cannot be packed with the allocated number of bits ({})",
887 config.hopping_offset,
888 config.N_ul_hop);
889
890 // Truncate the frequency resource allocation field.
892
893 // Frequency hopping offset - N_ul_hop bits.
894 payload.push_back(config.hopping_offset, config.N_ul_hop);
895 }
896
897 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
899
900 // Time domain resource assignment - 4 bit.
901 payload.push_back(config.time_resource, 4);
902
903 // Frequency hopping flag - 1 bit.
904 payload.push_back(config.frequency_hopping_flag, 1);
905
906 // Modulation coding scheme - 5 bits.
907 payload.push_back(config.modulation_coding_scheme, 5);
908
909 // New data indicator - 1 bit.
910 payload.push_back(config.new_data_indicator, 1);
911
912 // Redundancy version - 2 bit.
913 payload.push_back(config.redundancy_version, 2);
914
915 // HARQ process number - 4 bit.
916 payload.push_back(config.harq_process_number, 4);
917
918 // TPC command for scheduled PUSCH - 2 bit.
919 payload.push_back(config.tpc_command, 2);
920
921 if (config.payload_size.padding_incl_ul_sul.value() > 0) {
922 if (config.ul_sul_indicator.has_value()) {
923 // UL/SUL field is included if it is present in the DCI message and the number of DCI format 1_0 bits before
924 // padding is larger than the number of DCI format 0_0 bits before padding.
925 constexpr unsigned nof_ul_sul_bit = 1U;
926 // Padding bits, if necessary, as per TS38.212 Section 7.3.1.0.
928
929 // UL/SUL indicator - 1 bit.
930 payload.push_back(config.ul_sul_indicator.value(), nof_ul_sul_bit);
931 } else {
932 // UL/SUL field is not included otherwise.
933 payload.push_back(0x00U, config.payload_size.padding_incl_ul_sul.value());
934 }
935 }
936
937 // Assert total payload size.
938 srsran_assert(units::bits(payload.size()) == config.payload_size.total,
939 "Constructed payload size (i.e., {}) does not match expected payload size. Expected sizes:\n{}",
940 units::bits(payload.size()),
941 config.payload_size);
942
943 return payload;
944}
void push_back(bool val)
Appends a bit with value val to the set.
Definition bounded_bitset.h:437
constexpr T & value()
Accessor for the underlying value of the strong type.
Definition strong_type.h:115
unsigned harq_process_number
HARQ process number - 4 bits.
Definition dci_packing.h:576
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 6.1.2.2.2.
Definition dci_packing.h:564
unsigned N_ul_hop
Parameter , as per TS38.212 Section 7.3.1.1.1.
Definition dci_packing.h:550
optional< bool > ul_sul_indicator
UL/SUL indicator - 1 bit if present, as per TS38.212 Section 7.3.1.1.1 and Table 7....
Definition dci_packing.h:580
dci_0_0_size payload_size
DCI format 0_0 payload size parameters.
Definition dci_packing.h:541
unsigned time_resource
Time domain resource assignment - 4 bit as per TS38.214 Section 6.1.2.1.
Definition dci_packing.h:566
unsigned new_data_indicator
New data indicator - 1 bit.
Definition dci_packing.h:572
unsigned tpc_command
TPC command for scheduled PUSCH - 2 bits as per TS38.213 Section 7.1.1.
Definition dci_packing.h:578
unsigned redundancy_version
Redundancy version - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:574
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Section 6.1.4.1.
Definition dci_packing.h:570
unsigned hopping_offset
Frequency hopping offset, selected from the RRC parameter frequencyHoppingOffsetLists.
Definition dci_packing.h:561
unsigned frequency_hopping_flag
Frequency hopping flag - 1 bit as per TS38.214 Section 6.3 and Table 7.3.1.1.1-3.
Definition dci_packing.h:568
units::bits padding_incl_ul_sul
Number of padding bits, including the optional UL/SUL indicator field.
Definition dci_packing.h:385
units::bits frequency_resource
Size of the frequency domain resource assignment field - number of bits as per TS38....
Definition dci_packing.h:383
units::bits total
Total DCI payload size in number of bits.
Definition dci_packing.h:381

◆ dci_0_0_tc_rnti_pack()

dci_payload srsran::dci_0_0_tc_rnti_pack ( const dci_0_0_tc_rnti_configuration & config)

Packs a DCI format 0_0 scrambled by TC-RNTI.

947{
948 srsran_assert(config.payload_size.total.value() >= 12, "DCI payloads must be at least 12 bit long");
949
951 dci_payload payload;
952
953 // Identifier for DCI formats - 1 bit. This field is always 0, indicating an UL DCI format.
954 payload.push_back(0x00U, 1);
955
957
958 if (config.frequency_hopping_flag) {
959 // Assert that the number of bits used to pack the frequency hopping offset is valid.
960 srsran_assert((config.N_ul_hop == 1) || (config.N_ul_hop == 2),
961 "DCI frequency offset number of bits must be either 1 or 2");
962
963 // Assert that the frequency resource field has enough bits to include the frequency hopping offset.
964 srsran_assert(config.N_ul_hop < frequency_resource_nof_bits.value(),
965 "The frequency resource field must have enough bits to hold the frequency hopping offset");
966
967 // Assert that the frequency hopping offset can be packed with the allocated bits.
968 srsran_assert(config.hopping_offset < (1U << config.N_ul_hop),
969 "DCI frequency offset value ({}) cannot be packed with the allocated number of bits ({})",
970 config.hopping_offset,
971 config.N_ul_hop);
972
973 // Position of the LSB bit of the hopping offset within the frequency domain resource assignment field, as per
974 // TS38.212 Section 7.3.1.1.1.
976
977 // Frequency resource mask, to truncate the frequency resource payload before adding the hopping offset bits.
978 unsigned freq_resource_mask = (1U << hopping_offset_lsb_pos) - 1;
979
980 // Add the frequency hopping offset to the frequency domain resource assignment field.
983 }
984
985 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
987
988 // Time domain resource assignment - 4 bit.
989 payload.push_back(config.time_resource, 4);
990
991 // Frequency hopping flag - 1 bit.
992 payload.push_back(config.frequency_hopping_flag, 1);
993
994 // Modulation coding scheme - 5 bits.
995 payload.push_back(config.modulation_coding_scheme, 5);
996
997 // New data indicator - 1 bit, reserved.
998 payload.push_back(0x00U, 1);
999
1000 // Redundancy version - 2 bit.
1001 payload.push_back(config.redundancy_version, 2);
1002
1003 // HARQ process number - 4 bit, reserved.
1004 payload.push_back(0x00U, 4);
1005
1006 // TPC command for scheduled PUSCH - 2 bit.
1007 payload.push_back(config.tpc_command, 2);
1008
1009 if (config.payload_size.padding_incl_ul_sul.value() > 0) {
1010 // Padding bits, including UL/SUL reserved field.
1011 payload.push_back(0x00U, config.payload_size.padding_incl_ul_sul.value());
1012 }
1013
1014 // Assert total payload size.
1015 srsran_assert(units::bits(payload.size()) == config.payload_size.total,
1016 "Constructed payload size (i.e., {}) does not match expected payload size. Expected sizes:\n{}",
1017 units::bits(payload.size()),
1018 config.payload_size);
1019
1020 return payload;
1021}
unsigned frequency_hopping_flag
Frequency hopping flag - 1 bit as per TS38.214 Section 6.3 and Table 7.3.1.1.1-3.
Definition dci_packing.h:616
unsigned hopping_offset
Frequency hopping offset, as per TS 38.213 Section 8.3 and Table 8.3-1.
Definition dci_packing.h:609
unsigned N_ul_hop
Parameter , as per TS38.212 Section 7.3.1.1.1.
Definition dci_packing.h:602
unsigned tpc_command
TPC command for scheduled PUSCH - 2 bits as per TS38.213 Section 7.1.1.
Definition dci_packing.h:622
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Section 6.1.4.1.
Definition dci_packing.h:618
unsigned time_resource
Time domain resource assignment - 4 bit as per TS38.214 Section 6.1.2.1.
Definition dci_packing.h:614
unsigned redundancy_version
Redundancy version - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:620
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 6.1.2.2.2.
Definition dci_packing.h:612
dci_0_0_size payload_size
DCI format 0_0 payload size parameters.
Definition dci_packing.h:593

◆ dci_0_1_pack()

dci_payload srsran::dci_0_1_pack ( const dci_0_1_configuration & config)

Packs a DCI format 0_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI.

1229{
1230 srsran_assert(config.payload_size.total.value() >= 12, "DCI payloads must be at least 12 bit long");
1231
1232 // Assertions for unsupported fields.
1233 srsran_assert(!config.ul_sul_indicator.has_value(), "UL/SUL indicator field is not currently supported.");
1234 srsran_assert(!config.precoding_info_nof_layers.has_value(),
1235 "Precoding information and number of layers field is not currently supported.");
1236 srsran_assert(!config.ptrs_dmrs_association.has_value(), "PT-RS/DM-RS association field is not currently supported.");
1237
1238 dci_payload payload;
1239
1240 // Identifier for DCI formats - 1 bit. This field is always 0, indicating an UL DCI format.
1241 payload.push_back(0x00U, 1);
1242
1243 // Carrier indicator - 0 or 3 bits.
1244 if (config.carrier_indicator.has_value()) {
1245 payload.push_back(config.carrier_indicator.value(), config.payload_size.carrier_indicator.value());
1246 }
1247
1248 // UL/SUL indicator - 0 or 1 bit.
1249 if (config.ul_sul_indicator.has_value()) {
1250 payload.push_back(config.ul_sul_indicator.value(), config.payload_size.ul_sul_indicator.value());
1251 }
1252
1253 // Bandwidth part indicator - 0, 1 or 2 bits.
1254 if (config.bwp_indicator.has_value()) {
1255 payload.push_back(config.bwp_indicator.value(), config.payload_size.bwp_indicator.value());
1256 }
1257
1259
1261 // Indicates the DCI resource allocation type if both resource allocation type 0 and type 1 are configured.
1263 config.dynamic_pusch_res_allocation_type == dynamic_resource_allocation::type_0 ? 0 : 1;
1264
1265 // The MSB bit of the frequency domain allocation field is used to indicate the resource allocation type, as per
1266 // TS38.212 Section 7.3.1.1.2.
1268
1269 // The rest of the LSB bits are used to pack the frequency domain resource allocation.
1271 }
1272
1273 if (config.frequency_hopping_flag.has_value() && (config.frequency_hopping_flag.value() == 1)) {
1274 // Assert that the number of bits used to pack the frequency hopping offset is valid.
1275 srsran_assert((config.N_ul_hop.value() == 1) || (config.N_ul_hop.value() == 2),
1276 "DCI frequency offset number of bits must be either 1 or 2");
1277
1278 // Assert that the frequency resource field has enough bits to include the frequency hopping offset.
1279 srsran_assert(config.N_ul_hop.value() < frequency_resource_nof_bits.value(),
1280 "The frequency resource field must have enough bits to hold the frequency hopping offset");
1281
1282 // Assert that the frequency hopping offset can be packed with the allocated bits.
1283 srsran_assert(config.hopping_offset.value() < (1U << config.N_ul_hop.value()),
1284 "DCI frequency offset value, i.e., {} cannot be packed with the allocated number of bits, i.e., {}",
1285 config.hopping_offset,
1286 config.N_ul_hop);
1287
1288 // Truncate the frequency resource allocation field.
1290
1291 // Frequency hopping offset - 1 or 2 bits.
1292 payload.push_back(config.hopping_offset.value(), config.N_ul_hop.value());
1293 }
1294
1295 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1297
1298 // Time domain resource assignment - 0, 1, 2, 3 or 4 bits.
1299 if (config.payload_size.time_resource != units::bits(0)) {
1300 payload.push_back(config.time_resource, config.payload_size.time_resource.value());
1301 }
1302
1303 // Frequency hopping flag - 0 or 1 bit.
1304 if (config.frequency_hopping_flag.has_value()) {
1305 payload.push_back(config.frequency_hopping_flag.value(), config.payload_size.freq_hopping_flag.value());
1306 }
1307
1308 // Modulation coding scheme - 5 bits.
1309 payload.push_back(config.modulation_coding_scheme, 5);
1310
1311 // New data indicator - 1 bit.
1312 payload.push_back(config.new_data_indicator, 1);
1313
1314 // Redundancy version - 2 bits.
1315 payload.push_back(config.redundancy_version, 2);
1316
1317 // HARQ process number - 4 bits.
1318 payload.push_back(config.harq_process_number, 4);
1319
1320 // 1st downlink assignment index - 1 or 2 bits.
1322
1323 // 2nd downlink assignment index - 0 or 2 bits.
1326 }
1327
1328 // TPC command for scheduled PUSCH - 2 bits.
1329 payload.push_back(config.tpc_command, 2);
1330
1331 // SRS resource indicator (SRI).
1333
1334 // Precoding information and number of layers - 0 to 6 bits.
1335 if (config.precoding_info_nof_layers.has_value()) {
1337 }
1338
1339 // Antenna ports for PUSCH transmission - 2, 3, 4 or 5 bits.
1340 payload.push_back(config.antenna_ports, config.payload_size.antenna_ports.value());
1341
1342 // SRS request - 2 or 3 bits.
1343 payload.push_back(config.srs_request, config.payload_size.srs_request.value());
1344
1345 // CSI request - 0 to 6 bits.
1346 if (config.csi_request.has_value()) {
1347 payload.push_back(config.csi_request.value(), config.payload_size.csi_request.value());
1348 }
1349
1350 // CBG Transmission Information (CBGTI) - 0, 2, 4, 6 or 8 bits.
1351 if (config.cbg_transmission_info.has_value()) {
1353 }
1354
1355 // PT-RS/DM-RS association - 0 or 2 bits.
1356 if (config.ptrs_dmrs_association.has_value()) {
1358 }
1359
1360 // Beta offset indicator - 0 or 2 bits.
1361 if (config.beta_offset_indicator.has_value()) {
1363 }
1364
1365 // DM-RS sequence initialization - 0 or 1 bit.
1366 if (config.dmrs_seq_initialization.has_value()) {
1368 }
1369
1370 // UL-SCH indicator - 1 bit.
1371 payload.push_back(config.ul_sch_indicator, 1);
1372
1373 // Padding bits, if necessary, as per TS38.212 Section 7.3.1.0.
1374 if (config.payload_size.padding.value() > 0) {
1375 payload.push_back(0x00U, config.payload_size.padding.value());
1376 }
1377
1378 // Assert total payload size.
1379 srsran_assert(units::bits(payload.size()) == config.payload_size.total,
1380 "Constructed payload size (i.e., {}) does not match expected payload size. Expected sizes:\n{}",
1381 units::bits(payload.size()),
1382 config.payload_size);
1383
1384 return payload;
1385}
optional< unsigned > second_dl_assignment_index
2nd downlink assignment index - 2 bits if present.
Definition dci_packing.h:893
unsigned srs_request
SRS request - 2 or 3 bits.
Definition dci_packing.h:928
optional< unsigned > ptrs_dmrs_association
PT-RS/DM-RS association - 2 bit if present.
Definition dci_packing.h:944
unsigned new_data_indicator
New data indicator - 1 bit.
Definition dci_packing.h:879
optional< bool > ul_sul_indicator
UL/SUL indicator - 1 bit if present, as per TS38.212 Table 7.3.1.1.1-1.
Definition dci_packing.h:811
unsigned first_dl_assignment_index
1st downlink assignment index - 1 or 2 bits.
Definition dci_packing.h:888
unsigned ul_sch_indicator
UL-SCH indicator - 1 bit.
Definition dci_packing.h:960
optional< unsigned > csi_request
CSI request - 0 to 6 bits.
Definition dci_packing.h:932
optional< unsigned > bwp_indicator
Definition dci_packing.h:822
optional< unsigned > dmrs_seq_initialization
DM-RS sequence initialization - 1 bit if present.
Definition dci_packing.h:954
dci_0_1_size payload_size
DCI format 0_1 payload size parameters.
Definition dci_packing.h:796
optional< unsigned > precoding_info_nof_layers
Precoding information and number of layers.
Definition dci_packing.h:911
unsigned antenna_ports
Antenna ports for PUSCH transmission - 2, 3, 4 or 5 bits.
Definition dci_packing.h:918
unsigned redundancy_version
Redundancy version - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:881
optional< unsigned > carrier_indicator
Carrier indicator - 3 bits if present, as per TS38.213 Section 10.1.
Definition dci_packing.h:803
optional< unsigned > N_ul_hop
Parameter , as per TS38.212 Section 7.3.1.1.2.
Definition dci_packing.h:851
unsigned frequency_resource
Frequency domain resource assignment - number of bits as per TS38.212 Section 7.3....
Definition dci_packing.h:860
unsigned tpc_command
TPC command for scheduled PUSCH - 2 bits as per TS38.213 Section 7.1.1.
Definition dci_packing.h:895
unsigned harq_process_number
HARQ process number - 4 bits.
Definition dci_packing.h:883
unsigned time_resource
Time domain resource assignment - 0, 1, 2, 3 or 4 bits, as per TS38.214 Section 6....
Definition dci_packing.h:867
optional< unsigned > beta_offset_indicator
Beta offset indicator - 2 bits if present.
Definition dci_packing.h:949
unsigned srs_resource_indicator
SRS Resource Indicator (SRI).
Definition dci_packing.h:903
optional< unsigned > cbg_transmission_info
CBG Transmission Information (CBGTI) - 0, 2, 4, 6 or 8 bits.
Definition dci_packing.h:938
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Section 6.1.4.1.
Definition dci_packing.h:877
optional< unsigned > frequency_hopping_flag
Frequency hopping flag - 1 bit if present, as per TS38.212 Section 7.3.1.1.2 and TS38....
Definition dci_packing.h:875
optional< unsigned > hopping_offset
Frequency hopping offset, selected from the RRC parameter frequencyHoppingOffsetLists.
Definition dci_packing.h:839
optional< dynamic_resource_allocation > dynamic_pusch_res_allocation_type
PUSCH resource allocation type selector for dynamic PUSCH resource allocations.
Definition dci_packing.h:827
units::bits antenna_ports
Antenna ports field size - 2, 3, 4 or 5 bits.
Definition dci_packing.h:429
units::bits frequency_resource
Frequency domain resource assignment field size.
Definition dci_packing.h:415
units::bits padding
Number of padding bits.
Definition dci_packing.h:443
units::bits precoding_info_nof_layers
Precoding information and number of layers field size.
Definition dci_packing.h:427
units::bits csi_request
CSI request field size - 0 to 6 bits.
Definition dci_packing.h:433
units::bits freq_hopping_flag
Frequency hopping flag field size - 0 or 1 bit.
Definition dci_packing.h:419
units::bits total
Total DCI payload size in number of bits.
Definition dci_packing.h:407
units::bits ptrs_dmrs_association
PT-RS/DM-RS association field size - 0 or 2 bits.
Definition dci_packing.h:437
units::bits first_dl_assignment_idx
1st downlink assignment index field size - 1 or 2 bits.
Definition dci_packing.h:421
units::bits time_resource
Time domain resource assignment field size - 0, 1, 2, 3 or 4 bits.
Definition dci_packing.h:417
units::bits carrier_indicator
Carrier indicator field size - 0 or 3 bits.
Definition dci_packing.h:409
units::bits cbg_transmission_info
CBG Transmission Information (CBGTI) field size - 0, 2, 4, 6 or 8 bits.
Definition dci_packing.h:435
units::bits srs_resource_indicator
SRS resource indicator field size.
Definition dci_packing.h:425
units::bits second_dl_assignment_idx
2nd downlink assignment index field size - 2 bits if present.
Definition dci_packing.h:423
units::bits bwp_indicator
BWP indicator field size - 0, 1 or 2 bits.
Definition dci_packing.h:413
units::bits ul_sul_indicator
UL/SUL indicator field size - 0 or 1 bit.
Definition dci_packing.h:411
units::bits srs_request
SRS request field size - 2 or 3 bits.
Definition dci_packing.h:431
units::bits beta_offset_indicator
Beta offset indicator field size - 0 or 2 bits.
Definition dci_packing.h:439
units::bits dmrs_seq_initialization
DM-RS sequence initialization field size - 0 or 1 bit.
Definition dci_packing.h:441

◆ dci_1_0_c_rnti_pack()

dci_payload srsran::dci_1_0_c_rnti_pack ( const dci_1_0_c_rnti_configuration & config)

Packs a DCI format 1_0 scrambled by C-RNTI, CS-RNTI or MCS-C-RNTI.

1024{
1025 srsran_assert(config.payload_size.total.value() >= 12, "DCI payloads must be at least 12 bit long");
1026
1027 dci_payload payload;
1028
1029 // Identifier for DCI formats - 1 bit. This field is always 1, indicating a DL DCI format.
1030 payload.push_back(0x01U, 1);
1031
1032 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1034
1035 // Time domain resource assignment - 4 bit.
1036 payload.push_back(config.time_resource, 4);
1037
1038 // VRB-to-PRB mapping - 1 bit.
1039 payload.push_back(config.vrb_to_prb_mapping, 1);
1040
1041 // Modulation coding scheme - 5 bits.
1042 payload.push_back(config.modulation_coding_scheme, 5);
1043
1044 // New data indicator - 1 bit.
1045 payload.push_back(config.new_data_indicator, 1);
1046
1047 // Redundancy version - 2 bit.
1048 payload.push_back(config.redundancy_version, 2);
1049
1050 // HARQ process number - 4 bit.
1051 payload.push_back(config.harq_process_number, 4);
1052
1053 // Downlink assignment index - 2 bit.
1054 payload.push_back(config.dl_assignment_index, 2);
1055
1056 // TPC command for scheduled PUCCH - 2 bit.
1057 payload.push_back(config.tpc_command, 2);
1058
1059 // PUCCH resource indicator - 3 bit.
1060 payload.push_back(config.pucch_resource_indicator, 3);
1061
1062 // PDSCH to HARQ feedback timing indicator - 3 bit.
1063 payload.push_back(config.pdsch_harq_fb_timing_indicator, 3);
1064
1065 // Padding - nof_padding_bits bits.
1066 payload.push_back(0x00U, config.payload_size.padding.value());
1067
1068 // Assert total payload size.
1069 srsran_assert(units::bits(payload.size()) == config.payload_size.total,
1070 "Constructed payload size (i.e., {}) does not match expected payload size. Expected sizes:\n{}",
1071 units::bits(payload.size()),
1072 config.payload_size);
1073
1074 return payload;
1075}
unsigned tpc_command
TPC command for scheduled PUCCH - 2 bits as per TS38.213 Section 7.2.1.
Definition dci_packing.h:655
unsigned dl_assignment_index
Downlink assignment index - 2 bits as per TS38.213 Section 9.1.3.
Definition dci_packing.h:653
dci_1_0_size payload_size
DCI format 1_0 payload size parameters.
Definition dci_packing.h:636
unsigned new_data_indicator
New data indicator - 1 bit.
Definition dci_packing.h:647
unsigned vrb_to_prb_mapping
VRB-to-PRB mapping - 1 bit as per TS38.212 Table 7.3.1.2.2-5.
Definition dci_packing.h:643
unsigned pucch_resource_indicator
PUCCH resource indicator - 3 bits as per TS38.213 Section 9.2.3.
Definition dci_packing.h:657
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Section 5.1.3.
Definition dci_packing.h:645
unsigned redundancy_version
Redundancy version - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:649
unsigned pdsch_harq_fb_timing_indicator
PDSCH to HARQ feedback timing indicator - 3 bits as per TS38.213 Section 9.2.3.
Definition dci_packing.h:659
unsigned time_resource
Time domain resource assignment - 4 bit as per TS38.214 Section 5.1.2.1.
Definition dci_packing.h:641
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 5.1.2.2.2.
Definition dci_packing.h:639
unsigned harq_process_number
HARQ process number - 4 bits.
Definition dci_packing.h:651
units::bits frequency_resource
Size of the frequency domain resource assignment field - number of bits as per TS38....
Definition dci_packing.h:396
units::bits padding
Number of padding bits.
Definition dci_packing.h:398
units::bits total
Total DCI payload size in number of bits.
Definition dci_packing.h:394

◆ dci_1_0_p_rnti_pack()

dci_payload srsran::dci_1_0_p_rnti_pack ( const dci_1_0_p_rnti_configuration & config)

Packs a DCI format 1_0 scrambled by P-RNTI.

1078{
1080 dci_payload payload;
1081
1082 // Short Message Indicator - 2 bits.
1083 switch (config.short_messages_indicator) {
1084 case dci_1_0_p_rnti_configuration::payload_info::scheduling_information:
1085 payload.push_back(0b01U, 2);
1086 break;
1087 case dci_1_0_p_rnti_configuration::payload_info::short_messages:
1088 payload.push_back(0b10U, 2);
1089 break;
1090 case dci_1_0_p_rnti_configuration::payload_info::both:
1091 payload.push_back(0b11U, 2);
1092 break;
1093 }
1094
1095 // Short Messages - 8 bits.
1096 if (config.short_messages_indicator == dci_1_0_p_rnti_configuration::payload_info::scheduling_information) {
1097 // If only the scheduling information for paging is carried, this bit field is reserved.
1098 payload.push_back(0x00U, 8);
1099 } else {
1100 payload.push_back(config.short_messages, 8);
1101 }
1102
1103 if (config.short_messages_indicator == dci_1_0_p_rnti_configuration::payload_info::short_messages) {
1104 // If only the short message is carried, the scheduling information for paging bit fields are reserved.
1105 payload.push_back(0x00U, frequency_resource_nof_bits.value() + 12);
1106 } else {
1107 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1109
1110 // Time domain resource assignment - 4 bits.
1111 payload.push_back(config.time_resource, 4);
1112
1113 // VRB-to-PRB mapping - 1 bit.
1114 payload.push_back(config.vrb_to_prb_mapping, 1);
1115
1116 // Modulation and coding scheme - 5 bits.
1117 payload.push_back(config.modulation_coding_scheme, 5);
1118
1119 // Transport Block scaling - 2 bits.
1120 payload.push_back(config.tb_scaling, 2);
1121 }
1122
1123 // Reserved bits: 6 bits.
1124 payload.push_back(0x00U, 6);
1125
1126 return payload;
1127}
constexpr Integer log2_ceil(Integer value)
Calculates .
Definition math_utils.h:82
payload_info short_messages_indicator
Short Messages Indicator - 2 bits as per TS38.212 Section 7.3.1.2 and Table 7.3.1....
Definition dci_packing.h:680
unsigned short_messages
Short Messages - 8 bits as per TS38.331 Section 6.5 and Table 6.5-1.
Definition dci_packing.h:683
unsigned vrb_to_prb_mapping
VRB-to-PRB mapping - 1 bit as per TS38.212 Table 7.3.1.2.2-5.
Definition dci_packing.h:693
unsigned tb_scaling
Transport Block scaling - 2 bits as per TS38.214 Section 5.1.3 and Table 5.1.3.2-2.
Definition dci_packing.h:700
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Section 5.1.3 and Table 5.1....
Definition dci_packing.h:696
unsigned time_resource
Time domain resource assignment - 4 bit as per TS38.214 Section 5.1.2.1.
Definition dci_packing.h:690
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 5.1.2.2.2.
Definition dci_packing.h:687

◆ dci_1_0_ra_rnti_pack()

dci_payload srsran::dci_1_0_ra_rnti_pack ( const dci_1_0_ra_rnti_configuration & config)

Packs a DCI format 1_0 scrambled by RA-RNTI.

1159{
1161 dci_payload payload;
1162
1163 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1165
1166 // Time domain resource assignment - 4 bits.
1167 payload.push_back(config.time_resource, 4);
1168
1169 // VRB-to-PRB mapping - 1 bit.
1170 payload.push_back(config.vrb_to_prb_mapping, 1);
1171
1172 // Modulation and coding scheme - 5 bits.
1173 payload.push_back(config.modulation_coding_scheme, 5);
1174
1175 // Transport Block scaling - 2 bits.
1176 payload.push_back(config.tb_scaling, 2);
1177
1178 // Reserved bits - 16 bits.
1179 payload.push_back(0x00U, 16);
1180
1181 return payload;
1182}
unsigned time_resource
Time domain resource assignment - 4 bits as per TS38.214 Section 5.1.2.1.
Definition dci_packing.h:744
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 5.1.2.2.2.
Definition dci_packing.h:742
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Section 5.1.3 and Table 5.1....
Definition dci_packing.h:748
unsigned tb_scaling
Transport Block scaling - 2 bits as per TS38.214 Section 5.1.3 and Table 5.1.3.2-2.
Definition dci_packing.h:751
unsigned vrb_to_prb_mapping
VRB-to-PRB mapping - 1 bit as per to TS38.212 Table 7.3.1.2.2-5.
Definition dci_packing.h:746

◆ dci_1_0_si_rnti_pack()

dci_payload srsran::dci_1_0_si_rnti_pack ( const dci_1_0_si_rnti_configuration & config)

Packs a DCI format 1_0 scrambled by SI-RNTI.

1130{
1132 dci_payload payload;
1133
1134 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1136
1137 // Time domain resource assignment - 4 bit.
1138 payload.push_back(config.time_resource, 4);
1139
1140 // VRB-to-PRB mapping - 1 bit.
1141 payload.push_back(config.vrb_to_prb_mapping, 1);
1142
1143 // Modulation coding scheme - 5 bits.
1144 payload.push_back(config.modulation_coding_scheme, 5);
1145
1146 // Redundancy version - 2 bits.
1147 payload.push_back(config.redundancy_version, 2);
1148
1149 // System information indicator - 1 bit.
1150 payload.push_back(config.system_information_indicator, 1);
1151
1152 // Reserved bits - 15 bit.
1153 payload.push_back(0x00U, 15);
1154
1155 return payload;
1156}
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 5.1.2.2.2.
Definition dci_packing.h:714
unsigned vrb_to_prb_mapping
VRB-to-PRB mapping - 1 bit as per TS38.212 Table 7.3.1.2.2-5.
Definition dci_packing.h:718
unsigned system_information_indicator
System information indicator - 1 bit as per TS38.212 Table 7.3.1.2.1-2.
Definition dci_packing.h:724
unsigned redundancy_version
Redundancy version - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:722
unsigned time_resource
Time domain resource assignment - 4 bit as per TS38.214 Section 5.1.2.1.
Definition dci_packing.h:716
unsigned modulation_coding_scheme
Modulation coding scheme - 5 bits as per TS38.214 Section 5.1.3 and Table 5.1.3.1-1.
Definition dci_packing.h:720

◆ dci_1_0_tc_rnti_pack()

dci_payload srsran::dci_1_0_tc_rnti_pack ( const dci_1_0_tc_rnti_configuration & config)

Packs a DCI format 1_0 scrambled by TC-RNTI.

1185{
1187 dci_payload payload;
1188
1189 // Identifier for DCI formats - 1 bit. This field is always 1, indicating a DL DCI format.
1190 payload.push_back(0x01U, 1);
1191
1192 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1194
1195 // Time domain resource assignment - 4 bit.
1196 payload.push_back(config.time_resource, 4);
1197
1198 // VRB-to-PRB mapping - 1 bit.
1199 payload.push_back(config.vrb_to_prb_mapping, 1);
1200
1201 // Modulation coding scheme - 5 bits.
1202 payload.push_back(config.modulation_coding_scheme, 5);
1203
1204 // New data indicator - 1 bit.
1205 payload.push_back(config.new_data_indicator, 1);
1206
1207 // Redundancy version - 2 bit.
1208 payload.push_back(config.redundancy_version, 2);
1209
1210 // HARQ process number - 4 bit.
1211 payload.push_back(config.harq_process_number, 4);
1212
1213 // Downlink assignment index - 2 bit, reserved.
1214 payload.push_back(0x00U, 2);
1215
1216 // TPC command for scheduled PUCCH - 2 bit.
1217 payload.push_back(config.tpc_command, 2);
1218
1219 // PUCCH resource indicator - 3 bit.
1220 payload.push_back(config.pucch_resource_indicator, 3);
1221
1222 // PDSCH to HARQ feedback timing indicator - 3 bit.
1223 payload.push_back(config.pdsch_harq_fb_timing_indicator, 3);
1224
1225 return payload;
1226}
unsigned modulation_coding_scheme
Modulation and coding scheme - 5 bits as per TS38.214 Table 5.1.3.1-1.
Definition dci_packing.h:771
unsigned redundancy_version
Redundancy version - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:775
unsigned N_rb_dl_bwp
Parameter . It must be set to the CORESET0 size.
Definition dci_packing.h:762
unsigned time_resource
Time domain resource assignment - 4 bit as per TS38.214 Section 5.1.2.1.
Definition dci_packing.h:767
unsigned pdsch_harq_fb_timing_indicator
PDSCH to HARQ feedback timing indicator - 3 bits as per TS38.213 Section 9.2.3.
Definition dci_packing.h:783
unsigned vrb_to_prb_mapping
VRB-to-PRB mapping - 1 bit as per TS38.212 Table 7.3.1.2.2-5.
Definition dci_packing.h:769
unsigned pucch_resource_indicator
PUCCH resource indicator - 3 bits as per TS38.213 Section 9.2.3.
Definition dci_packing.h:781
unsigned frequency_resource
Frequency domain resource assignment - bits as per TS38.214 Section 5.1.2.2.2.
Definition dci_packing.h:765
unsigned tpc_command
TPC command for scheduled PUCCH - 2 bits as per TS38.213 Section 7.2.1.
Definition dci_packing.h:779
unsigned new_data_indicator
New data indicator - 1 bit.
Definition dci_packing.h:773
unsigned harq_process_number
HARQ process number - 4 bits.
Definition dci_packing.h:777

◆ dci_1_1_pack()

dci_payload srsran::dci_1_1_pack ( const dci_1_1_configuration & config)

Packs a DCI format 1_1 scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI.

1388{
1389 srsran_assert(config.payload_size.total.value() >= 12, "DCI payloads must be at least 12 bit long");
1390
1391 dci_payload payload;
1392
1393 // Identifier for DCI formats - 1 bit. This field is always 1, indicating a DL DCI format.
1394 payload.push_back(0x01U, 1);
1395
1396 // Carrier indicator - 0 or 3 bits.
1397 if (config.carrier_indicator.has_value()) {
1398 payload.push_back(config.carrier_indicator.value(), config.payload_size.carrier_indicator.value());
1399 }
1400
1401 // Bandwidth part indicator - 0, 1 or 2 bits.
1402 if (config.bwp_indicator.has_value()) {
1403 payload.push_back(config.bwp_indicator.value(), config.payload_size.bwp_indicator.value());
1404 }
1405
1407
1409 // Indicates the DCI resource allocation type if both resource allocation type 0 and type 1 are configured.
1411 config.dynamic_pdsch_res_allocation_type == dynamic_resource_allocation::type_0 ? 0 : 1;
1412
1413 // The MSB bit of the frequency domain allocation field is used to indicate the resource allocation type, as per
1414 // TS38.212 Section 7.3.1.2.2.
1416
1417 // The rest of the LSB bits are used to pack the frequency domain resource allocation.
1419 }
1420
1421 // Frequency domain resource assignment - frequency_resource_nof_bits bits.
1423
1424 // Time domain resource assignment - 0, 1, 2, 3 or 4 bits.
1425 if (config.payload_size.time_resource != units::bits(0)) {
1426 payload.push_back(config.time_resource, config.payload_size.time_resource.value());
1427 }
1428
1429 // VRB-to-PRB mapping - 0 or 1 bit.
1430 if (config.vrb_prb_mapping.has_value()) {
1431 payload.push_back(config.vrb_prb_mapping.value(), config.payload_size.vrb_prb_mapping.value());
1432 }
1433
1434 // PRB bundling size indicator - 0 or 1 bit.
1436 payload.push_back(config.prb_bundling_size_indicator.value(),
1438 }
1439
1440 // Rate matching indicator - 0, 1 or 2 bits.
1441 if (config.rate_matching_indicator.has_value()) {
1443 }
1444
1445 // ZP CSI-RS trigger - 0, 1 or 2 bits.
1446 if (config.zp_csi_rs_trigger.has_value()) {
1447 payload.push_back(config.zp_csi_rs_trigger.value(), config.payload_size.zp_csi_rs_trigger.value());
1448 }
1449
1450 // Modulation coding scheme for TB 1 - 5 bits.
1451 payload.push_back(config.tb1_modulation_coding_scheme, 5);
1452
1453 // New data indicator for TB 1 - 1 bit.
1454 payload.push_back(config.tb1_new_data_indicator, 1);
1455
1456 // Redundancy version for TB 1 - 2 bits.
1457 payload.push_back(config.tb1_redundancy_version, 2);
1458
1459 // Modulation coding scheme for TB 2 - 0 or 5 bits.
1461 payload.push_back(config.tb2_modulation_coding_scheme.value(),
1463 }
1464
1465 // New data indicator for TB 2 - 0 or 1 bit.
1466 if (config.tb2_new_data_indicator.has_value()) {
1468 }
1469
1470 // Redundancy version for TB 2 - 0 or 2 bits.
1471 if (config.tb2_redundancy_version.has_value()) {
1473 }
1474
1475 // HARQ process number - 4 bits.
1476 payload.push_back(config.harq_process_number, 4);
1477
1478 // Downlink Assignment Index (DAI) - 0, 2 or 4 bits.
1479 if (config.downlink_assignment_index.has_value()) {
1481 }
1482
1483 // TPC command for scheduled PUSCH - 2 bits.
1484 payload.push_back(config.tpc_command, 2);
1485
1486 // PUCCH resource indicator - 3 bits.
1487 payload.push_back(config.pucch_resource_indicator, 3);
1488
1489 // PDSCH to HARQ feedback timing indicator - 0, 1, 2 or 3 bits.
1491 payload.push_back(config.pdsch_harq_fb_timing_indicator.value(),
1493 }
1494
1495 // Antenna ports for PDSCH transmission - 4, 5 or 6 bits.
1496 payload.push_back(config.antenna_ports, config.payload_size.antenna_ports.value());
1497
1498 // Transmission configuration indication - 0 or 3 bits.
1499 if (config.tx_config_indication.has_value()) {
1500 payload.push_back(config.tx_config_indication.value(), config.payload_size.tx_config_indication.value());
1501 }
1502
1503 // SRS request - 2 or 3 bits.
1504 payload.push_back(config.srs_request, config.payload_size.srs_request.value());
1505
1506 // CBG Transmission Information (CBGTI) - 0, 2, 4, 6 or 8 bits.
1507 if (config.cbg_transmission_info.has_value()) {
1509 }
1510
1511 // CBG Flushing Information (CBGFI) - 0 or 1 bit.
1512 if (config.cbg_flushing_info.has_value()) {
1513 payload.push_back(config.cbg_flushing_info.value(), config.payload_size.cbg_flushing_info.value());
1514 }
1515
1516 // DM-RS sequence initialization - 1 bit.
1517 payload.push_back(config.dmrs_seq_initialization, 1);
1518
1519 // Padding bits, if necessary, as per TS38.212 Section 7.3.1.0.
1520 if (config.payload_size.padding.value() > 0) {
1521 payload.push_back(0x00U, config.payload_size.padding.value());
1522 }
1523
1524 // Assert total payload size.
1525 srsran_assert(units::bits(payload.size()) == config.payload_size.total,
1526 "Constructed payload size (i.e., {}) does not match expected payload size. Expected sizes:\n{}",
1527 units::bits(payload.size()),
1528 config.payload_size);
1529
1530 return payload;
1531}
unsigned tb1_new_data_indicator
New data indicator for TB 1 - 1 bit.
Definition dci_packing.h:1041
optional< unsigned > tb2_new_data_indicator
New data indicator for TB 2 - 1 bit if present.
Definition dci_packing.h:1053
unsigned tb1_modulation_coding_scheme
Modulation and coding scheme for TB 1 - 5 bits as per TS38.214 Section 5.1.3.1.
Definition dci_packing.h:1039
optional< unsigned > tb2_modulation_coding_scheme
Modulation and coding scheme for TB 2 - 5 bits if present.
Definition dci_packing.h:1048
optional< unsigned > vrb_prb_mapping
VRB-to-PRB mapping - 1 bit if present.
Definition dci_packing.h:1019
unsigned time_resource
Time domain resource assignment - 0, 1, 2, 3 or 4 bit, as per TS38.214 Section 5.1....
Definition dci_packing.h:1012
optional< unsigned > prb_bundling_size_indicator
PRB bundling size indicator - 1 bit if present.
Definition dci_packing.h:1025
unsigned srs_request
SRS request - 2 or 3 bits.
Definition dci_packing.h:1107
optional< unsigned > zp_csi_rs_trigger
ZP CSI-RS trigger - 0, 1 or 2 bits.
Definition dci_packing.h:1037
unsigned tpc_command
TPC command for scheduled PUCCH - 2 bits as per TS38.213 Section 7.2.1.
Definition dci_packing.h:1072
optional< unsigned > tx_config_indication
Transmission configuration indication - 3 bits if present.
Definition dci_packing.h:1097
optional< unsigned > rate_matching_indicator
Rate matching indicator - 0, 1 or 2 bits.
Definition dci_packing.h:1031
optional< unsigned > pdsch_harq_fb_timing_indicator
PDSCH to HARQ feedback timing indicator - 0, 1, 2 or 3 bits.
Definition dci_packing.h:1083
optional< unsigned > carrier_indicator
Carrier indicator - 3 bits if present, as per TS38.213 Section 10.1.
Definition dci_packing.h:980
dci_1_1_size payload_size
DCI format 1_1 payload size parameters.
Definition dci_packing.h:973
optional< unsigned > downlink_assignment_index
Downlink Assignment Index (DAI) - 0, 2 or 4 bits.
Definition dci_packing.h:1070
optional< unsigned > cbg_flushing_info
CBG Flushing Information (CBGFI) - 1 bit if present.
Definition dci_packing.h:1120
unsigned frequency_resource
Frequency domain resource assignment - number of bits as per TS38.212 Section 7.3....
Definition dci_packing.h:1005
unsigned tb1_redundancy_version
Redundancy version for TB 1 - 2 bits as per TS38.212 Table 7.3.1.1.1-2.
Definition dci_packing.h:1043
optional< dynamic_resource_allocation > dynamic_pdsch_res_allocation_type
PDSCH resource allocation type selector for dynamic PDSCH resource allocations.
Definition dci_packing.h:996
unsigned pucch_resource_indicator
PUCCH resource indicator - 3 bits as per TS38.213 Section 9.2.3.
Definition dci_packing.h:1074
unsigned dmrs_seq_initialization
DM-RS sequence initialization - 1 bit.
Definition dci_packing.h:1122
optional< unsigned > tb2_redundancy_version
Redundancy version for TB 2 - 2 bits if present.
Definition dci_packing.h:1058
unsigned harq_process_number
HARQ process number - 4 bits.
Definition dci_packing.h:1060
optional< unsigned > cbg_transmission_info
CBG Transmission Information (CBGTI) - 0, 2, 4, 6 or 8 bits.
Definition dci_packing.h:1114
unsigned antenna_ports
Antenna ports for PDSCH transmission - 4, 5 or 6 bits.
Definition dci_packing.h:1091
optional< unsigned > bwp_indicator
Definition dci_packing.h:991
units::bits pdsch_harq_fb_timing_indicator
PDSCH to HARQ feedback timing indicator field size - 0, 1, 2 or 3 bits.
Definition dci_packing.h:478
units::bits srs_request
SRS request field size - 2 or 3 bits.
Definition dci_packing.h:484
units::bits antenna_ports
Antenna ports field size - 4, 5 or 6 bits.
Definition dci_packing.h:480
units::bits total
Total DCI payload size in number of bits.
Definition dci_packing.h:452
units::bits tb2_redundancy_version
Redundancy version for TB 2 field size - 0 or 2 bits.
Definition dci_packing.h:474
units::bits carrier_indicator
Carrier indicator field size - 0 or 3 bits.
Definition dci_packing.h:454
units::bits cbg_flushing_info
CBG Flushing Out Information (CBGFI) field size - 0 or 1 bit.
Definition dci_packing.h:488
units::bits prb_bundling_size_indicator
PRB bundling size indicator field size - 0 or 1 bit.
Definition dci_packing.h:464
units::bits tb2_new_data_indicator
New data indicator for TB 2 field size - 0 or 1 bit.
Definition dci_packing.h:472
units::bits zp_csi_rs_trigger
ZP CSI-RS trigger field size - 0, 1 or 2 bits.
Definition dci_packing.h:468
units::bits vrb_prb_mapping
VRP-to-PRB mapping field size - 0 or 1 bit.
Definition dci_packing.h:462
units::bits cbg_transmission_info
CBG Transmission Information (CBGTI) field size - 0, 2, 4, 6 or 8 bits.
Definition dci_packing.h:486
units::bits time_resource
Time domain resource assignment field size - 0, 1, 2, 3 or 4 bits.
Definition dci_packing.h:460
units::bits downlink_assignment_index
Downlink Assignment Index (DAI) field size - 0, 2 or 4 bits.
Definition dci_packing.h:476
units::bits rate_matching_indicator
Rate matching indicator field size - 0, 1 or 2 bits.
Definition dci_packing.h:466
units::bits tx_config_indication
Transmission configuration indication field size - 0 or 3 bits.
Definition dci_packing.h:482
units::bits tb2_modulation_coding_scheme
Modulation and coding scheme for TB 2 field size - 0 or 5 bits.
Definition dci_packing.h:470
units::bits bwp_indicator
BWP indicator field size - 0, 1 or 2 bits.
Definition dci_packing.h:456
units::bits padding
Number of padding bits.
Definition dci_packing.h:490
units::bits frequency_resource
Frequency domain resource assignment field size.
Definition dci_packing.h:458

◆ dci_dl_rnti_config_format()

const char * srsran::dci_dl_rnti_config_format ( dci_dl_rnti_config_type type)
inline
60{
61 if (type != dci_dl_rnti_config_type::c_rnti_f1_1) {
62 return "1_0";
63 }
64 return "1_1";
65}

◆ dci_dl_rnti_config_rnti_type()

const char * srsran::dci_dl_rnti_config_rnti_type ( dci_dl_rnti_config_type type)
inline
54{
55 std::array<const char*, 6> rnti_types = {"si-rnti", "ra-rnti", "c-rnti", "tc-rnti", "p-rnti", "c-rnti"};
56 return (unsigned)type < rnti_types.size() ? rnti_types[(unsigned)type] : "invalid";
57}

◆ dci_rar_pack()

dci_payload srsran::dci_rar_pack ( const dci_rar_configuration & config)

Packs a DCI transmitted in a Random Access Response.

1534{
1535 dci_payload payload;
1536
1537 // Frequency hopping flag - 1 bit.
1538 payload.push_back(config.frequency_hopping_flag, 1);
1539
1540 // PUSCH frequency resource allocation - 14 bits.
1541 payload.push_back(config.frequency_resource, 14);
1542
1543 // PUSCH time resource allocation - 4 bits.
1544 payload.push_back(config.time_resource, 4);
1545
1546 // Modulation and coding scheme - 4 bits.
1547 payload.push_back(config.modulation_coding_scheme, 4);
1548
1549 // TPC command for PUSCH - 3 bits.
1550 payload.push_back(config.tpc, 3);
1551
1552 // CSI request - 1 bit.
1553 payload.push_back(config.csi_request, 1);
1554
1555 return payload;
1556}
unsigned frequency_resource
PUSCH frequency resource allocation - 14 bits.
Definition dci_packing.h:1133
unsigned time_resource
PUSCH time resource allocation - 4 bits.
Definition dci_packing.h:1135
unsigned frequency_hopping_flag
Frequency hopping flag - 1 bit.
Definition dci_packing.h:1131
unsigned modulation_coding_scheme
Modulation and coding scheme - 4 bits.
Definition dci_packing.h:1137
unsigned tpc
Transmission power control for PUSCH - 3 bits.
Definition dci_packing.h:1139
unsigned csi_request
CSI request - 1 bit.
Definition dci_packing.h:1141

◆ dci_ul_rnti_config_format()

const char * srsran::dci_ul_rnti_config_format ( dci_ul_rnti_config_type type)
inline
93{
94 if (type != dci_ul_rnti_config_type::c_rnti_f0_1) {
95 return "0_0";
96 }
97 return "0_1";
98}

◆ dci_ul_rnti_config_rnti_type()

const char * srsran::dci_ul_rnti_config_rnti_type ( dci_ul_rnti_config_type type)
inline
87{
88 std::array<const char*, 3> rnti_types = {"tc-rnti", "c-rnti", "c-rnti"};
89 return (unsigned)type < rnti_types.size() ? rnti_types[(unsigned)type] : "invalid";
90}

◆ decode_crnti_ce()

rnti_t srsran::decode_crnti_ce ( byte_buffer_view payload)
inline

Decode C-RNTI MAC CE.

91{
92 if (payload.length() < 2) {
93 return rnti_t::INVALID_RNTI;
94 }
95
96 // Conversion between Little Endian to RNTI value. See TS 38.321, 6.1.3.2 - C-RNTI MAC CE.
97 return to_rnti(le16toh((uint16_t)payload[0] << 8U | payload[1]));
98}
size_t length() const
Checks the length in bytes of the view.
Definition byte_buffer.h:86

◆ decode_lbsr()

expected< long_bsr_report > srsran::decode_lbsr ( bsr_format format,
byte_buffer_view payload )

Decode Long BSR.

88{
90
91 byte_buffer_reader reader = payload;
92
93 // read LCG bitmap
94 const uint8_t bitmap = *reader;
95 ++reader;
96
97 // early stop if LBSR is empty
98 if (bitmap == 0) {
99 return lbsr;
100 }
101
102 for (uint8_t i = 0; i != MAX_NOF_LCGS; i++) {
103 // If LCGi bit is enabled, it means the next 8-bit BSR value corresponds to it
104 if ((bitmap & (0x1U << i)) != 0) {
105 lcg_bsr_report bsr = {};
106 bsr.lcg_id = uint_to_lcg_id(i);
107 if (reader.length() > 0) {
108 bsr.buffer_size = *reader;
109 ++reader;
110
111 if (bsr.buffer_size == 255) {
112 srslog::fetch_basic_logger("MAC").warning("lcg={}: Discarding BSR. Cause: BSR=255 is invalid.", i);
113 return {default_error_t{}};
114 }
115 } else if (format == bsr_format::LONG_TRUNC_BSR) {
116 // In the case of Long truncated BSR, some LCG buffer sizes may not be present. Assume BSR > 0 in that case.
117 // Assume that the LCG has 64 bytes pending (implementation-defined).
118 bsr.buffer_size = 64;
119 } else {
120 srslog::fetch_basic_logger("MAC").error("Error parsing LongBSR CE: sdu_length={} but there are {} active bsr\n",
121 payload.length(),
122 lbsr.list.size());
123 return {default_error_t{}};
124 }
125 lbsr.list.push_back(bsr);
126 }
127 }
128
129 return lbsr;
130}
Used to read a range of bytes stored in a byte_buffer.
Definition byte_buffer.h:563
size_t length() const
Checks the length in bytes of the view.
Definition byte_buffer.h:86
Definition expected.h:31
UL BSR Report for a single Logical Channel Group.
Definition ul_bsr.h:35
Definition ul_bsr.h:53

◆ decode_sbsr()

lcg_bsr_report srsran::decode_sbsr ( byte_buffer_view payload)
inline

Decode Short BSR.

45{
46 srsran_sanity_check(not payload.empty(), "Trying to decode SBSR but payload is empty.");
47 lcg_bsr_report sbsr = {};
48 sbsr.lcg_id = uint_to_lcg_id((payload[0] & 0xe0U) >> 5U);
49 sbsr.buffer_size = payload[0] & 0x1fU;
50 return sbsr;
51}
bool empty() const
Checks whether the view is empty.
Definition byte_buffer.h:83

◆ decode_se_phr()

phr_report srsran::decode_se_phr ( byte_buffer_view payload)
inline

Decode Single Entry PHR.

Remarks
See TS 38.321, 6.1.3.8.
75{
76 srsran_sanity_check(not payload.empty(), "Trying to decode SE-PHR but payload is empty.");
77 srsran_sanity_check(payload.length() == 2, "Invalid payload length={} while decoding SE-PHR.", payload.length());
78 phr_report se_phr = {};
79 se_phr.set_se_phr(cell_ph_report{.serv_cell_id = to_du_cell_index(0),
80 .ph_type = ph_field_type_t::type1,
81 .ph = ph_to_db_range(payload[0] & 0b00111111U),
82 .p_cmax = p_cmax_to_dbm_range(payload[1] & 0b00111111U)});
83 return se_phr;
84}
UL Power Headroom Report (PHR).
Definition phr_report.h:59
void set_se_phr(const cell_ph_report &cell_phr)
Sets Single-Entry PHR report.
Definition phr_report.h:68

◆ defer_to()

template<typename TaskExecutor >
auto srsran::defer_to ( TaskExecutor & exec)

Awaiter that defers continuation to execution context provided by given executor.

67{
68 struct task_executor_awaiter {
69 task_executor_awaiter(TaskExecutor& exec_) : exec(exec_) {}
70
71 bool await_ready() noexcept { return false; }
72
73 void await_suspend(coro_handle<> suspending_awaitable)
74 {
75 bool res = exec.defer([this, suspending_awaitable]() mutable {
76 success = true;
77 suspending_awaitable.resume();
78 });
79 if (not res) {
80 // Failed to dispatch task. Resume it from current thread, but with "success == false".
81 success = false;
82 suspending_awaitable.resume();
83 }
84 }
85
86 bool await_resume() { return success; }
87
88 task_executor_awaiter& get_awaiter() { return *this; }
89
90 private:
91 TaskExecutor& exec;
92 bool success;
93 };
94
95 return task_executor_awaiter{exec};
96}

◆ demodulate_soft_QAM16()

void srsran::demodulate_soft_QAM16 ( span< log_likelihood_ratio > llrs,
span< const cf_t > symbols,
span< const float > noise_vars )

Soft-demodulates 16-QAM modulation.

Parameters
[out]llrsResultant log-likelihood ratios.
[in]symbolsInput constellation symbols.
[in]noise_varsNoise variance for each symbol in the constellation.
211{
212 const cf_t* symbols_it = symbols.begin();
213 const float* noise_it = noise_vars.begin();
215 std::size_t symbol_index = 0;
216
217#ifdef HAVE_AVX2
218 // For AVX2, it generates 32 LLRs simultaneously. The input is read in batches of 8 symbols.
219 for (std::size_t symbol_index_end = (symbols.size() / 8) * 8; symbol_index != symbol_index_end; symbol_index += 8) {
221
222 llr_it += 32;
223 symbols_it += 8;
224 noise_it += 8;
225 }
226#endif // HAVE_AVX2
227
228#ifdef HAVE_NEON
229 // For NEON, it generates 16 LLRs simultaneously. The input is read in batches of 4 symbols.
230 for (std::size_t symbol_index_end = (symbols.size() / 4) * 4; symbol_index != symbol_index_end; symbol_index += 4) {
232
233 llr_it += 16;
234 symbols_it += 4;
235 noise_it += 4;
236 }
237#endif // HAVE_NEON
238
239 for (std::size_t symbol_index_end = symbols.size(); symbol_index != symbol_index_end; ++symbol_index) {
240 *llr_it++ = demod_16QAM_symbol_01(std::real(*symbols_it), *noise_it);
241 *llr_it++ = demod_16QAM_symbol_01(std::imag(*symbols_it), *noise_it);
242 *llr_it++ = demod_16QAM_symbol_23(std::real(*symbols_it), *noise_it);
243 *llr_it++ = demod_16QAM_symbol_23(std::imag(*symbols_it), *noise_it);
244 ++symbols_it;
245 ++noise_it;
246 }
247}
Represents log-likelihood ratio (LLR) values.
Definition log_likelihood_ratio.h:47
constexpr size_type size() const noexcept
Returns the number of elements in the span.
Definition span.h:168
std::complex< float > cf_t
Type to store complex samples.
Definition complex.h:41

◆ demodulate_soft_QAM256()

void srsran::demodulate_soft_QAM256 ( span< log_likelihood_ratio > llrs,
span< const cf_t > symbols,
span< const float > noise_vars )

Soft-demodulates 256-QAM modulation.

Parameters
[out]llrsResultant log-likelihood ratios.
[in]symbolsInput constellation symbols.
[in]noise_varsNoise variance for each symbol in the constellation.
305{
306 const cf_t* symbols_it = symbols.begin();
307 const float* noise_it = noise_vars.begin();
309 std::size_t symbol_index = 0;
310
311#ifdef HAVE_AVX2
312 // For AVX2, it generates 32 LLRs simultaneously. The input is read in batches of 4 symbols.
313 for (std::size_t symbol_index_end = (symbols.size() / 4) * 4; symbol_index != symbol_index_end; symbol_index += 4) {
315
316 llr_it += 32;
317 symbols_it += 4;
318 noise_it += 4;
319 }
320#endif // HAVE_AVX2
321
322#ifdef HAVE_NEON
323 // For NEON, it generates 32 LLRs simultaneously. The input is read in batches of 4 symbols.
324 for (std::size_t symbol_index_end = (symbols.size() / 4) * 4; symbol_index != symbol_index_end; symbol_index += 4) {
326
327 llr_it += 32;
328 symbols_it += 4;
329 noise_it += 4;
330 }
331#endif // HAVE_NEON
332
333 for (std::size_t symbol_index_end = symbols.size(); symbol_index != symbol_index_end; ++symbol_index) {
334 float rcp_noise = 0;
335 // Note: "noise_var > 0" is false also when "noise_var" is NaN.
336 if (*noise_it > 0) {
337 rcp_noise = 1 / (*noise_it);
338 }
339 *llr_it++ = demod_256QAM_symbol_01(std::real(*symbols_it), rcp_noise);
340 *llr_it++ = demod_256QAM_symbol_01(std::imag(*symbols_it), rcp_noise);
341 *llr_it++ = demod_256QAM_symbol_23(std::real(*symbols_it), rcp_noise);
342 *llr_it++ = demod_256QAM_symbol_23(std::imag(*symbols_it), rcp_noise);
343 *llr_it++ = demod_256QAM_symbol_45(std::real(*symbols_it), rcp_noise);
344 *llr_it++ = demod_256QAM_symbol_45(std::imag(*symbols_it), rcp_noise);
345 *llr_it++ = demod_256QAM_symbol_67(std::real(*symbols_it), rcp_noise);
346 *llr_it++ = demod_256QAM_symbol_67(std::imag(*symbols_it), rcp_noise);
347 ++symbols_it;
348 ++noise_it;
349 }
350}

◆ demodulate_soft_QAM64()

void srsran::demodulate_soft_QAM64 ( span< log_likelihood_ratio > llrs,
span< const cf_t > symbols,
span< const float > noise_vars )

Soft-demodulates 64-QAM modulation.

Parameters
[out]llrsResultant log-likelihood ratios.
[in]symbolsInput constellation symbols.
[in]noise_varsNoise variance for each symbol in the constellation.
288{
289 const cf_t* symbols_it = symbols.begin();
290 const float* noise_it = noise_vars.begin();
292 std::size_t symbol_index = 0;
293
294#ifdef HAVE_AVX2
295 // For AVX2, it generates 96 LLRs simultaneously. The input is read in batches of 16 symbols.
296 for (std::size_t symbol_index_end = (symbols.size() / 16) * 16; symbol_index != symbol_index_end;
297 symbol_index += 16) {
299
300 llr_it += 96;
301 symbols_it += 16;
302 noise_it += 16;
303 }
304#endif // HAVE_AVX2
305
306#ifdef HAVE_NEON
307 // For NEON, it generates 48 LLRs simultaneously. The input is read in batches of 8 symbols.
308 for (std::size_t symbol_index_end = (symbols.size() / 8) * 8; symbol_index != symbol_index_end; symbol_index += 8) {
310
311 llr_it += 48;
312 symbols_it += 8;
313 noise_it += 8;
314 }
315#endif // HAVE_NEON
316
317 for (std::size_t symbol_index_end = symbols.size(); symbol_index != symbol_index_end; ++symbol_index) {
318 float rcp_noise = 0;
319 // Note: "*noise_it > 0" is false also when "*noise_it" is NaN.
320 if (*noise_it > 0) {
321 rcp_noise = 1 / (*noise_it);
322 }
323 *llr_it++ = demod_64QAM_symbol_01(std::real(*symbols_it), rcp_noise);
324 *llr_it++ = demod_64QAM_symbol_01(std::imag(*symbols_it), rcp_noise);
325 *llr_it++ = demod_64QAM_symbol_23(std::real(*symbols_it), rcp_noise);
326 *llr_it++ = demod_64QAM_symbol_23(std::imag(*symbols_it), rcp_noise);
327 *llr_it++ = demod_64QAM_symbol_45(std::real(*symbols_it), rcp_noise);
328 *llr_it++ = demod_64QAM_symbol_45(std::imag(*symbols_it), rcp_noise);
329 ++symbols_it;
330 ++noise_it;
331 }
332}

◆ demodulate_soft_QPSK()

void srsran::demodulate_soft_QPSK ( span< log_likelihood_ratio > llrs,
span< const cf_t > symbols,
span< const float > noise_vars )

Soft-demodulates QPSK modulation.

Parameters
[out]llrsResultant log-likelihood ratios.
[in]symbolsInput constellation symbols.
[in]noise_varsNoise variance for each symbol in the constellation.
134{
135 const cf_t* symbols_it = symbols.begin();
136 const float* noise_it = noise_vars.begin();
138 std::size_t symbol_index = 0;
139
140#ifdef HAVE_AVX2
141 // For AVX2, it generates 32 LLRs simultaneously. The input is read in batches of 16 symbols.
142 for (std::size_t symbol_index_end = (symbols.size() / 16) * 16; symbol_index != symbol_index_end;
143 symbol_index += 16) {
145
146 llr_it += 32;
147 symbols_it += 16;
148 noise_it += 16;
149 }
150#endif // HAVE_AVX2
151
152#ifdef HAVE_NEON
153 // For NEON, it generates 16 LLRs simultaneously. The input is read in batches of 8 symbols.
154 for (std::size_t symbol_index_end = (symbols.size() / 8) * 8; symbol_index != symbol_index_end; symbol_index += 8) {
156
157 llr_it += 16;
158 symbols_it += 8;
159 noise_it += 8;
160 }
161#endif // HAVE_NEON
162
163 // Process remainder symbols with the generic algorithm.
164 for (std::size_t symbol_index_end = symbols.size(); symbol_index != symbol_index_end; ++symbol_index) {
166 *llr_it++ = demod_QPSK_symbol(std::real(this_symbol), *noise_it);
167 *llr_it++ = demod_QPSK_symbol(std::imag(this_symbol), *noise_it);
168 ++noise_it;
169 }
170}

◆ derive_auto_params()

void srsran::derive_auto_params ( gnb_appconfig & gnb_params)

This function takes the appconfig and generates the values for the parameters set to be auto-configured.

1827{
1828 for (auto& cell : gnb_params.cells_cfg) {
1829 derive_cell_auto_params(cell.cell);
1830 }
1831}

◆ dispatch_and_resume_on() [1/2]

template<typename DispatchTaskExecutor , typename CurrentTaskExecutor , typename Callable , typename ReturnType = detail::function_return_t<decltype(&Callable::operator())>>
std::enable_if_t< std::is_same< ReturnType, void >::value, async_task< void > > srsran::dispatch_and_resume_on ( DispatchTaskExecutor & dispatch_exec,
CurrentTaskExecutor & return_exec,
Callable && callable )
192{
193 return launch_async(
194 [&return_exec, &dispatch_exec, task = std::forward<Callable>(callable)](coro_context<async_task<void>>& ctx) {
195 CORO_BEGIN(ctx);
196 CORO_AWAIT(execute_on(dispatch_exec));
197 task();
198 CORO_AWAIT(execute_on(return_exec));
199 CORO_RETURN();
200 });
201}
Definition async_task.h:33
auto launch_async(Args &&... args) -> typename detail::future_of< FunT >
Creates coroutine frame and launches task if eager.
Definition coroutine.h:336
auto execute_on(TaskExecutor &exec)
Awaiter that switches to execution context provided by given executor.
Definition execute_on.h:32
Base class for coroutine frames.
Definition coroutine.h:133

◆ dispatch_and_resume_on() [2/2]

template<typename DispatchTaskExecutor , typename CurrentTaskExecutor , typename Callable , typename ReturnType = detail::function_return_t<decltype(&Callable::operator())>>
std::enable_if_t< not std::is_same< ReturnType, void >::value, async_task< ReturnType > > srsran::dispatch_and_resume_on ( DispatchTaskExecutor & dispatch_exec,
CurrentTaskExecutor & return_exec,
Callable && callable )
209{
210 ReturnType ret{};
211 return launch_async([&return_exec, &dispatch_exec, task = std::forward<Callable>(callable), ret](
212 coro_context<async_task<ReturnType>>& ctx) mutable {
213 CORO_BEGIN(ctx);
214 CORO_AWAIT(execute_on(dispatch_exec));
215 ret = task();
216 CORO_AWAIT(execute_on(return_exec));
217 CORO_RETURN(ret);
218 });
219}

◆ divide_ceil()

constexpr unsigned srsran::divide_ceil ( unsigned num,
unsigned den )
inlineconstexpr

Performs an integer division rounding up.

Parameters
[in]numNumerator.
[out]denDenominator.
Returns
The result of the operation.
42{
43 srsran_sanity_check(den != 0, "Denominator cannot be zero.");
44 return (num + (den - 1)) / den;
45}

◆ divide_round()

constexpr unsigned srsran::divide_round ( unsigned num,
unsigned den )
inlineconstexpr

Performs an integer division rounding to the nearest integer.

Parameters
[in]numNumerator.
[out]denDenominator.
Returns
The result of the operation.
53{
54 srsran_sanity_check(den != 0, "Denominator cannot be zero.");
55 return static_cast<unsigned>(std::round(static_cast<float>(num) / static_cast<float>(den)));
56}

◆ dmrs_sequence_generate()

void srsran::dmrs_sequence_generate ( span< cf_t > sequence,
pseudo_random_generator & prg,
float amplitude,
unsigned reference_point_k_rb,
unsigned nof_dmrs_per_rb,
const bounded_bitset< MAX_RB > & rb_mask )
inline

Helper function to generate DMRS sequences.

This function generates DMRS sequences based on a pseudo-random sequence generation. It generates nof_dmrs_per_rb for every active resource block given in rb_mask and skips the nof_dmrs_per_rb for every inactive resource block.

Parameters
[out]sequenceProvides the destination storage for the generated sequence.
[in,out]prgProvides the pseudo-random generator to use.
[in]amplitudeProvides the sequence amplitude.
[in]reference_point_k_rbIndicates the RB index for reference.
[in]nof_dmrs_per_rbIndicates the number of DMRS to generate per active RB.
[in]rb_maskIndicates the active resource blocks.
Note
It assumes that the pseudo-random generator is initialized.
The sequence size must be consistent with the number of active RBs and the number of DMRS per RB.
50{
51 unsigned nof_dmrs_symbols = nof_dmrs_per_rb * rb_mask.count();
52 srsran_assert(sequence.size() == nof_dmrs_symbols,
53 "DM-RS sequence size, i.e., {} does not match the number of RE allocated for DM-RS, i.e., {}.",
54 sequence.size(),
55 nof_dmrs_symbols);
56
57 if (rb_mask.is_contiguous(true)) {
58 // Number of PRB to skip.
59 unsigned prb_skip = rb_mask.find_lowest(true) - reference_point_k_rb;
60 prg.advance(prb_skip * nof_dmrs_per_rb * 2);
61
62 prg.generate(sequence, amplitude);
63 return;
64 }
65
66 // Counts consecutive used PRB.
67 unsigned prb_count = 0;
68
69 // Number of PRB to skip.
70 unsigned prb_skip = 0;
71
72 // Iterate over all PRBs, starting at reference point for k.
73 for (unsigned prb_idx = reference_point_k_rb; prb_idx != rb_mask.size(); ++prb_idx) {
74 // If the PRB is used for PDSCH transmission count
75 if (rb_mask.test(prb_idx)) {
76 // If it is the first PRB...
77 if (prb_count == 0) {
78 // ... discard unused pilots.
79 prg.advance(prb_skip * nof_dmrs_per_rb * 2);
80 prb_skip = 0;
81 }
82 ++prb_count;
83
84 continue;
85 }
86
87 // Increase number of PRB to skip.
88 ++prb_skip;
89
90 // End of consecutive PRB, skip copying if no PRB was counted.
91 if (prb_count == 0) {
92 continue;
93 }
94
95 // Generate contiguous pilots.
96 prg.generate(sequence.first(prb_count * nof_dmrs_per_rb), amplitude);
97
98 // Advance sequence buffer.
99 sequence = sequence.last(sequence.size() - prb_count * nof_dmrs_per_rb);
100
101 // Reset counter.
102 prb_count = 0;
103 }
104
105 // Generate the last group of contiguous RB.
106 if (prb_count > 0) {
107 prg.generate(sequence.first(prb_count * nof_dmrs_per_rb), amplitude);
108 }
109}
bool test(size_t pos) const
Check if bit with provided index is set to true.
Definition bounded_bitset.h:569
bool is_contiguous(bool value=true) const noexcept
Determines whether all bits with value set to value are contiguous.
Definition bounded_bitset.h:875
virtual void advance(unsigned count)=0
Advances the pseudo-random generator state without generating sequence bits or applying any mask.
virtual void generate(bit_buffer &data)=0
Generates a bit pseudo-random sequence.
span< element_type > first(size_type count) const
Definition span.h:217
span< element_type > last(size_type count) const
Definition span.h:225

◆ do_not_optimize() [1/3]

template<typename T >
std::enable_if_t< std::is_trivially_copyable< T >::value &&(sizeof(T)<=sizeof(T *))> srsran::do_not_optimize ( T & value)
inline
47{
48 asm volatile("" : "+m,r"(value) : : "memory");
49}

◆ do_not_optimize() [2/3]

template<typename T >
std::enable_if_t<!std::is_trivially_copyable< T >::value||(sizeof(T) > sizeof(T *))> srsran::do_not_optimize ( T & value)
inline
52{
53 asm volatile("" : "+m"(value) : : "memory");
54}

◆ do_not_optimize() [3/3]

template<typename T >
std::enable_if_t<!std::is_trivially_copyable< T >::value||(sizeof(T) > sizeof(T *))> srsran::do_not_optimize ( T const & value)
inline
42{
43 asm volatile("" : : "m"(value) : "memory");
44}

◆ drb_id_to_uint()

constexpr uint8_t srsran::drb_id_to_uint ( drb_id_t id)
inlineconstexpr
129{
130 return static_cast<uint8_t>(id);
131}

◆ e1ap_asn1_ng_dl_up_unchanged_to_bool()

bool srsran::e1ap_asn1_ng_dl_up_unchanged_to_bool ( asn1::e1ap::pdu_session_res_setup_item_s::ng_dl_up_unchanged_e_ ng_dl_up_unchanged)
inline

Convert E1AP NG DL UP Unchanged to its boolean representation.

Parameters
ng_dl_up_unchangedThe E1AP NG DL UP Unchanged.
Returns
The boolean representation of E1AP NG DL UP Unchanged.
1040{
1041 return ng_dl_up_unchanged.value ==
1042 asn1::e1ap::pdu_session_res_setup_item_s::ng_dl_up_unchanged_opts::options::true_value;
1043}

◆ e1ap_asn1_pdcp_count_to_pdcp_count()

e1ap_pdcp_count srsran::e1ap_asn1_pdcp_count_to_pdcp_count ( asn1::e1ap::pdcp_count_s asn1_pdcp_count)
inline

Convert E1AP ASN.1 PDCP Count to e1ap_pdcp_count type.

1047{
1048 e1ap_pdcp_count pdcp_count;
1049
1050 pdcp_count.hfn = asn1_pdcp_count.hfn;
1051 pdcp_count.pdcp_sn = asn1_pdcp_count.pdcp_sn;
1052
1053 return pdcp_count;
1054}
Definition e1ap_types.h:120

◆ e1ap_asn1_to_cell_group_info()

void srsran::e1ap_asn1_to_cell_group_info ( std::vector< e1ap_cell_group_info_item > & cell_group_info,
const asn1::e1ap::cell_group_info_l & asn1_cell_group_info )
inline

Convert E1AP ASN.1 Cell Group Info to std::vector<e1ap_cell_group_info_item> type.

1093{
1094 for (const auto& asn1_cell_group_info_item : asn1_cell_group_info) {
1095 e1ap_cell_group_info_item cell_group_info_item;
1096 cell_group_info_item.cell_group_id = asn1_cell_group_info_item.cell_group_id;
1097
1098 if (asn1_cell_group_info_item.ul_cfg_present) {
1099 cell_group_info_item.ul_cfg = asn1_cell_group_info_item.ul_cfg.to_string();
1100 }
1101
1102 if (asn1_cell_group_info_item.dl_tx_stop_present) {
1103 cell_group_info_item.dl_tx_stop = asn1_cell_group_info_item.dl_tx_stop.to_string();
1104 }
1105
1106 if (asn1_cell_group_info_item.rat_type_present) {
1107 cell_group_info_item.rat_type = asn1_cell_group_info_item.rat_type.to_string();
1108 }
1109
1110 cell_group_info.push_back(cell_group_info_item);
1111 }
1112}
Definition e1ap_types.h:72

◆ e1ap_asn1_to_cgi()

nr_cell_global_id_t srsran::e1ap_asn1_to_cgi ( const asn1::e1ap::nr_cgi_s & asn1_cgi)
inline

Convert E1AP ASN.1 CGI to nr_cell_global_id_t type.

1058{
1059 nr_cell_global_id_t cgi = {};
1060 uint32_t encoded_plmn = asn1_cgi.plmn_id.to_number();
1061 ngap_plmn_to_mccmnc(encoded_plmn, &cgi.mcc, &cgi.mnc);
1062
1063 std::string mcc_string, mnc_string;
1064 mcc_to_string(cgi.mcc, &mcc_string);
1065 mnc_to_string(cgi.mnc, &mnc_string);
1066 cgi.plmn = mcc_string + mnc_string;
1067
1068 // Set PLMN hex string
1069 cgi.plmn_hex = asn1_cgi.plmn_id.to_string();
1070
1071 cgi.nci = asn1_cgi.nr_cell_id.to_number();
1072
1073 return cgi;
1074}

◆ e1ap_asn1_to_ciphering_algorithm()

srsran::security::ciphering_algorithm srsran::e1ap_asn1_to_ciphering_algorithm ( const asn1::e1ap::ciphering_algorithm_e & asn1_ciph_algo)
inline

Converts E1AP ASN.1 type to type and ciphering_algorithm type.

Parameters
[in]asn1_ciph_algoASN.1 Cyphering Algorithm object.
Returns
The ciphering_algorithm object where the result of the conversion is stored.
75{
76 srsran::security::ciphering_algorithm ciph_algo = {};
77
78 switch (asn1_ciph_algo) {
79 case asn1::e1ap::ciphering_algorithm_opts::nea0:
80 ciph_algo = srsran::security::ciphering_algorithm::nea0;
81 break;
82 case asn1::e1ap::ciphering_algorithm_opts::c_neg128_nea1:
83 ciph_algo = srsran::security::ciphering_algorithm::nea1;
84 break;
85 case asn1::e1ap::ciphering_algorithm_opts::c_neg128_nea2:
86 ciph_algo = srsran::security::ciphering_algorithm::nea2;
87 break;
88 case asn1::e1ap::ciphering_algorithm_opts::c_neg128_nea3:
89 ciph_algo = srsran::security::ciphering_algorithm::nea3;
90 break;
91 default:
92 srsran_assert(false, "Invalid ciphering algorithm ({})", asn1_ciph_algo);
93 }
94
95 return ciph_algo;
96}

◆ e1ap_asn1_to_data_forwarding_info_request()

e1ap_data_forwarding_info_request srsran::e1ap_asn1_to_data_forwarding_info_request ( const asn1::e1ap::data_forwarding_info_request_s & asn1_data_forwarding_info_request)
inline

Convert E1AP ASN.1 Data Forwarding Info Request to e1ap_data_forwarding_info_request type.

1232{
1233 e1ap_data_forwarding_info_request data_forwarding_info_request;
1234
1235 // drb data forwarding info request
1236 data_forwarding_info_request.data_forwarding_request =
1237 asn1_data_forwarding_info_request.data_forwarding_request.to_string();
1238
1239 for (const auto& asn1_qos_flows_forwarded_item :
1240 asn1_data_forwarding_info_request.qos_flows_forwarded_on_fwd_tunnels) {
1241 e1ap_qos_flow_map_item qos_flows_forwarded_item = asn1_e1ap_to_qos_flow_map_item(asn1_qos_flows_forwarded_item);
1242
1243 data_forwarding_info_request.qos_flows_forwarded_on_fwd_tunnels.emplace(
1244 uint_to_qos_flow_id(asn1_qos_flows_forwarded_item.qos_flow_id), qos_flows_forwarded_item);
1245 }
1246
1247 return data_forwarding_info_request;
1248}
e1ap_qos_flow_map_item asn1_e1ap_to_qos_flow_map_item(const asn1::e1ap::qos_flow_map_item_s &asn1_qos_flow_map_item)
Convert E1AP ASN.1 QoS Flow Map Item to e1ap_qos_flow_map_item type.
Definition e1ap_asn1_converters.h:1078

◆ e1ap_asn1_to_flow_map_info()

void srsran::e1ap_asn1_to_flow_map_info ( slotted_id_vector< qos_flow_id_t, e1ap_qos_flow_qos_param_item > & flow_map_info,
const asn1::e1ap::qos_flow_qos_param_list_l & ans1_flow_map_list )
inline

Convert E1AP ASN.1 QoS Flow Map Info to slotted_id_vector<qos_flow_id_t, e1ap_qos_flow_qos_param_item> type.

1118{
1119 for (const auto& asn1_flow_map_item : ans1_flow_map_list) {
1120 e1ap_qos_flow_qos_param_item flow_map_item;
1121 flow_map_item.qos_flow_id = uint_to_qos_flow_id(asn1_flow_map_item.qos_flow_id);
1122 // Add qos flow level params
1123
1124 // Add qos characteristics
1125 if (asn1_flow_map_item.qos_flow_level_qos_params.qos_characteristics.type() ==
1126 asn1::e1ap::qos_characteristics_c::types_opts::dyn_5qi) {
1127 auto& asn1_dyn_5qi = asn1_flow_map_item.qos_flow_level_qos_params.qos_characteristics.dyn_5qi();
1128
1129 dyn_5qi_descriptor_t dyn_5qi;
1130 dyn_5qi.qos_prio_level = uint_to_qos_prio_level(asn1_dyn_5qi.qos_prio_level);
1131 dyn_5qi.packet_delay_budget = asn1_dyn_5qi.packet_delay_budget;
1132 dyn_5qi.packet_error_rate.per_exponent = asn1_dyn_5qi.packet_error_rate.per_exponent;
1133 dyn_5qi.packet_error_rate.per_scalar = asn1_dyn_5qi.packet_error_rate.per_scalar;
1134
1135 if (asn1_dyn_5qi.five_qi_present) {
1136 dyn_5qi.five_qi = uint_to_five_qi(asn1_dyn_5qi.five_qi);
1137 }
1138 if (asn1_dyn_5qi.delay_crit_present) {
1139 dyn_5qi.delay_crit = asn1_dyn_5qi.delay_crit.to_string();
1140 }
1141 if (asn1_dyn_5qi.averaging_win_present) {
1142 dyn_5qi.averaging_win = asn1_dyn_5qi.averaging_win;
1143 }
1144 if (asn1_dyn_5qi.max_data_burst_volume_present) {
1145 dyn_5qi.max_data_burst_volume = asn1_dyn_5qi.max_data_burst_volume;
1146 }
1147
1148 flow_map_item.qos_flow_level_qos_params.qos_characteristics.dyn_5qi = dyn_5qi;
1149 } else {
1150 auto& asn1_non_dyn_5qi = asn1_flow_map_item.qos_flow_level_qos_params.qos_characteristics.non_dyn_5qi();
1151
1152 non_dyn_5qi_descriptor_t non_dyn_5qi;
1153 non_dyn_5qi.five_qi = uint_to_five_qi(asn1_non_dyn_5qi.five_qi);
1154 if (asn1_non_dyn_5qi.qos_prio_level_present) {
1155 non_dyn_5qi.qos_prio_level = uint_to_qos_prio_level(asn1_non_dyn_5qi.qos_prio_level);
1156 }
1157 if (asn1_non_dyn_5qi.averaging_win_present) {
1158 non_dyn_5qi.averaging_win = asn1_non_dyn_5qi.averaging_win;
1159 }
1160 if (asn1_non_dyn_5qi.max_data_burst_volume_present) {
1161 non_dyn_5qi.max_data_burst_volume = asn1_non_dyn_5qi.max_data_burst_volume;
1162 }
1163
1164 flow_map_item.qos_flow_level_qos_params.qos_characteristics.non_dyn_5qi = non_dyn_5qi;
1165 }
1166 // add ng ran alloc retention prio
1167 flow_map_item.qos_flow_level_qos_params.ng_ran_alloc_retention_prio.prio_level =
1168 asn1_flow_map_item.qos_flow_level_qos_params.ngra_nalloc_retention_prio.prio_level;
1169 flow_map_item.qos_flow_level_qos_params.ng_ran_alloc_retention_prio.pre_emption_cap =
1170 asn1_flow_map_item.qos_flow_level_qos_params.ngra_nalloc_retention_prio.pre_emption_cap.to_string();
1171 flow_map_item.qos_flow_level_qos_params.ng_ran_alloc_retention_prio.pre_emption_vulnerability =
1172 asn1_flow_map_item.qos_flow_level_qos_params.ngra_nalloc_retention_prio.pre_emption_vulnerability.to_string();
1173
1174 // Add gbr qos flow info
1175 if (asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info_present) {
1176 e1ap_gbr_qos_flow_info gbr_qos_flow_info;
1177 gbr_qos_flow_info.max_flow_bit_rate_dl =
1178 asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.max_flow_bit_rate_dl;
1179 gbr_qos_flow_info.max_flow_bit_rate_ul =
1180 asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.max_flow_bit_rate_ul;
1181 gbr_qos_flow_info.guaranteed_flow_bit_rate_dl =
1182 asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.guaranteed_flow_bit_rate_dl;
1183 gbr_qos_flow_info.guaranteed_flow_bit_rate_ul =
1184 asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.guaranteed_flow_bit_rate_ul;
1185 if (asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.max_packet_loss_rate_dl_present) {
1186 gbr_qos_flow_info.max_packet_loss_rate_dl =
1187 asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.max_packet_loss_rate_dl;
1188 }
1189 if (asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.max_packet_loss_rate_ul_present) {
1190 gbr_qos_flow_info.max_packet_loss_rate_ul =
1191 asn1_flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info.max_packet_loss_rate_ul;
1192 }
1193
1194 flow_map_item.qos_flow_level_qos_params.gbr_qos_flow_info = gbr_qos_flow_info;
1195 }
1196
1197 // Add reflective qos attribute
1198 if (asn1_flow_map_item.qos_flow_level_qos_params.reflective_qos_attribute_present) {
1199 flow_map_item.qos_flow_level_qos_params.reflective_qos_attribute =
1200 asn1::enum_to_bool(asn1_flow_map_item.qos_flow_level_qos_params.reflective_qos_attribute);
1201 }
1202
1203 // Add add qos info
1204 if (asn1_flow_map_item.qos_flow_level_qos_params.add_qos_info_present) {
1205 flow_map_item.qos_flow_level_qos_params.add_qos_info =
1206 asn1::enum_to_bool(asn1_flow_map_item.qos_flow_level_qos_params.add_qos_info);
1207 }
1208
1209 // Add paging policy ind
1210 if (asn1_flow_map_item.qos_flow_level_qos_params.paging_policy_ind_present) {
1211 flow_map_item.qos_flow_level_qos_params.paging_policy_ind =
1212 asn1_flow_map_item.qos_flow_level_qos_params.paging_policy_ind;
1213 }
1214
1215 // Add reflective qos ind
1216 if (asn1_flow_map_item.qos_flow_level_qos_params.reflective_qos_ind_present) {
1217 flow_map_item.qos_flow_level_qos_params.reflective_qos_ind =
1218 asn1::enum_to_bool(asn1_flow_map_item.qos_flow_level_qos_params.reflective_qos_ind);
1219 }
1220
1221 // Add qos flow map ind
1222 if (asn1_flow_map_item.qos_flow_map_ind_present) {
1223 flow_map_item.qos_flow_map_ind = asn1_flow_map_item.qos_flow_map_ind.to_string();
1224 }
1225 flow_map_info.emplace(uint_to_qos_flow_id(asn1_flow_map_item.qos_flow_id), flow_map_item);
1226 }
1227}
T & emplace(key_type id, Args &&... args)
Definition slotted_array.h:630
constexpr qos_prio_level_t uint_to_qos_prio_level(uint8_t qos_prio_level)
Convert integer to QoS Priority Level type.
Definition qos_prio_level.h:43
constexpr five_qi_t uint_to_five_qi(uint16_t five_qi)
Convert integer to Five QI type.
Definition five_qi.h:43
Definition cu_types.h:103
Definition e1ap_types.h:104

◆ e1ap_asn1_to_integrity_algorithm()

srsran::security::integrity_algorithm srsran::e1ap_asn1_to_integrity_algorithm ( const asn1::e1ap::integrity_protection_algorithm_e & asn1_int_algo)
inline

Converts E1AP ASN.1 type to type and integrity_algorithm type.

Parameters
[in]asn1_int_algoASN.1 Integrity Protection Algorithm object.
Returns
The integrity_algorithm object where the result of the conversion is stored.
131{
132 srsran::security::integrity_algorithm int_algo = {};
133
134 switch (asn1_int_algo) {
135 case asn1::e1ap::integrity_protection_algorithm_opts::nia0:
136 int_algo = srsran::security::integrity_algorithm::nia0;
137 break;
138 case asn1::e1ap::integrity_protection_algorithm_opts::i_neg128_nia1:
139 int_algo = srsran::security::integrity_algorithm::nia1;
140 break;
141 case asn1::e1ap::integrity_protection_algorithm_opts::i_neg128_nia2:
142 int_algo = srsran::security::integrity_algorithm::nia2;
143 break;
144 case asn1::e1ap::integrity_protection_algorithm_opts::i_neg128_nia3:
145 int_algo = srsran::security::integrity_algorithm::nia3;
146 break;
147 default:
148 srsran_assert(false, "Invalid integrity protection algorithm ({})", asn1_int_algo);
149 }
150
151 return int_algo;
152}

◆ e1ap_asn1_to_pdcp_config()

e1ap_pdcp_config srsran::e1ap_asn1_to_pdcp_config ( asn1::e1ap::pdcp_cfg_s asn1_pdcp_cfg)
inline

Converts E1AP ASN.1 type to an e1ap_pdcp_config type.

Parameters
asn1_pdcp_cfgE1AP ASN.1 object.
Returns
The pdcp config object where the result of the conversion is stored.
872{
873 e1ap_pdcp_config pdcp_cfg;
874
875 // pdcp sn size dl
876 pdcp_cfg.pdcp_sn_size_dl = asn1_to_pdcp_sn_size(asn1_pdcp_cfg.pdcp_sn_size_dl);
877
878 // pdcp sn size ul
879 pdcp_cfg.pdcp_sn_size_ul = asn1_to_pdcp_sn_size(asn1_pdcp_cfg.pdcp_sn_size_ul);
880
881 // rlc mode
882 pdcp_cfg.rlc_mod = asn1_to_rlc_mode(asn1_pdcp_cfg.rlc_mode);
883
884 // rohc params
885 if (asn1_pdcp_cfg.rohc_params_present) {
886 if (asn1_pdcp_cfg.rohc_params.type().value == asn1::e1ap::rohc_params_c::types_opts::rohc) {
887 e1ap_rohc_params rohc_params = {};
888 e1ap_rohc rohc = {};
889
890 rohc.max_cid = asn1_pdcp_cfg.rohc_params.rohc().max_c_id;
891 rohc.rohc_profiles = asn1_pdcp_cfg.rohc_params.rohc().rohc_profiles;
892 if (asn1_pdcp_cfg.rohc_params.rohc().continue_rohc_present) {
893 if (asn1_pdcp_cfg.rohc_params.rohc().continue_rohc ==
894 asn1::e1ap::rohc_s::continue_rohc_opts::options::true_value) {
895 rohc.continue_rohc = true;
896 } else {
897 rohc.continue_rohc = false;
898 }
899 }
900
901 rohc_params.rohc = rohc;
902 pdcp_cfg.rohc_params = rohc_params;
903 } else if (asn1_pdcp_cfg.rohc_params.type().value == asn1::e1ap::rohc_params_c::types_opts::ul_only_rohc) {
904 e1ap_rohc_params rohc_params = {};
905 e1ap_rohc ul_only_rohc;
906
907 ul_only_rohc.max_cid = asn1_pdcp_cfg.rohc_params.ul_only_rohc().max_c_id;
908 ul_only_rohc.rohc_profiles = asn1_pdcp_cfg.rohc_params.ul_only_rohc().rohc_profiles;
909
910 if (asn1_pdcp_cfg.rohc_params.ul_only_rohc().continue_rohc_present) {
911 if (asn1_pdcp_cfg.rohc_params.ul_only_rohc().continue_rohc ==
912 asn1::e1ap::ul_only_rohc_s::continue_rohc_opts::options::true_value) {
913 ul_only_rohc.continue_rohc = true;
914 } else {
915 ul_only_rohc.continue_rohc = false;
916 }
917 }
918
919 rohc_params.ul_only_rohc = ul_only_rohc;
920 pdcp_cfg.rohc_params = rohc_params;
921 }
922 }
923
924 // t reordering timer
925 if (asn1_pdcp_cfg.t_reordering_timer_present) {
926 pdcp_cfg.t_reordering_timer = asn1_to_pdcp_t_reordering(asn1_pdcp_cfg.t_reordering_timer.t_reordering);
927 }
928
929 // discard timer
930 if (asn1_pdcp_cfg.discard_timer_present) {
931 pdcp_cfg.discard_timer = asn1_to_pdcp_discard_timer(asn1_pdcp_cfg.discard_timer);
932 }
933
934 // ul data split thres
935 if (asn1_pdcp_cfg.ul_data_split_thres_present) {
936 pdcp_cfg.ul_data_split_thres = asn1_pdcp_cfg.ul_data_split_thres.to_number();
937 }
938
939 // pdcp dupl
940 if (asn1_pdcp_cfg.pdcp_dupl_present) {
941 if (asn1_pdcp_cfg.pdcp_dupl == asn1::e1ap::pdcp_dupl_opts::options::true_value) {
942 pdcp_cfg.pdcp_dupl = true;
943 } else {
944 pdcp_cfg.pdcp_dupl = false;
945 }
946 }
947
948 // pdcp reest
949 if (asn1_pdcp_cfg.pdcp_reest_present) {
950 if (asn1_pdcp_cfg.pdcp_reest == asn1::e1ap::pdcp_reest_opts::options::true_value) {
951 pdcp_cfg.pdcp_reest = true;
952 } else {
953 pdcp_cfg.pdcp_reest = false;
954 }
955 }
956
957 // pdcp data recovery
958 if (asn1_pdcp_cfg.pdcp_data_recovery_present) {
959 if (asn1_pdcp_cfg.pdcp_data_recovery == asn1::e1ap::pdcp_data_recovery_opts::options::true_value) {
960 pdcp_cfg.pdcp_data_recovery = true;
961 } else {
962 pdcp_cfg.pdcp_data_recovery = false;
963 }
964 }
965
966 // dupl activation
967 if (asn1_pdcp_cfg.dupl_activation_present) {
968 pdcp_cfg.dupl_activation = asn1_pdcp_cfg.dupl_activation.to_string();
969 }
970
971 // out of orfder delivery
972 if (asn1_pdcp_cfg.out_of_order_delivery_present) {
973 if (asn1_pdcp_cfg.out_of_order_delivery == asn1::e1ap::out_of_order_delivery_opts::options::true_value) {
974 pdcp_cfg.out_of_order_delivery = true;
975 } else {
976 pdcp_cfg.out_of_order_delivery = false;
977 }
978 }
979
980 return pdcp_cfg;
981}
pdcp_discard_timer asn1_to_pdcp_discard_timer(asn1::e1ap::discard_timer_e asn1_discard_timer)
Converts E1AP ASN.1 discard timer type to pdcp_discard_timer type.
Definition e1ap_asn1_converters.h:386
pdcp_sn_size asn1_to_pdcp_sn_size(asn1::e1ap::pdcp_sn_size_e asn1_sn_size)
Convert E1AP ASN.1 to PDCP SN size.
Definition e1ap_asn1_converters.h:367
srsran::pdcp_rlc_mode asn1_to_rlc_mode(asn1::e1ap::rlc_mode_e asn1_rlc_mod)
Converts E1AP ASN.1 type to an rlc_mode type.
Definition e1ap_asn1_converters.h:326
pdcp_t_reordering asn1_to_pdcp_t_reordering(asn1::e1ap::t_reordering_e asn1_t_reordering)
Converts E1AP ASN.1 t-Reordering type to pdcp_t_reordering type.
Definition e1ap_asn1_converters.h:507
Definition e1ap_types.h:146
Definition e1ap_types.h:141

◆ e1ap_asn1_to_pdcp_sn_status_info()

e1ap_pdcp_sn_status_info srsran::e1ap_asn1_to_pdcp_sn_status_info ( const asn1::e1ap::pdcp_sn_status_info_s & asn1_pdcp_sn_status_info)
inline

Convert E1AP ASN.1 PDCP SN Status Info to e1ap_pdcp_sn_status_info type.

1253{
1254 e1ap_pdcp_sn_status_info pdcp_sn_status_info = {};
1255
1256 pdcp_sn_status_info.pdcp_status_transfer_ul.count_value.pdcp_sn =
1257 asn1_pdcp_sn_status_info.pdcp_status_transfer_ul.count_value.pdcp_sn;
1258 pdcp_sn_status_info.pdcp_status_transfer_ul.count_value.hfn =
1259 asn1_pdcp_sn_status_info.pdcp_status_transfer_ul.count_value.hfn;
1260
1261 if (asn1_pdcp_sn_status_info.pdcp_status_transfer_ul.receive_statusof_pdcp_sdu_present) {
1262 pdcp_sn_status_info.pdcp_status_transfer_ul.receive_status_of_pdcp_sdu =
1263 asn1_pdcp_sn_status_info.pdcp_status_transfer_ul.receive_statusof_pdcp_sdu.to_number();
1264 }
1265
1266 pdcp_sn_status_info.pdcp_status_transfer_dl.pdcp_sn = asn1_pdcp_sn_status_info.pdcp_status_transfer_dl.pdcp_sn;
1267 pdcp_sn_status_info.pdcp_status_transfer_dl.hfn = asn1_pdcp_sn_status_info.pdcp_status_transfer_dl.hfn;
1268
1269 return pdcp_sn_status_info;
1270}
Definition e1ap_types.h:130

◆ e1ap_asn1_to_sdap_config()

sdap_config_t srsran::e1ap_asn1_to_sdap_config ( asn1::e1ap::sdap_cfg_s asn1_sdap_cfg)
inline

Converts E1AP ASN.1 type to sdap_config to type.

Parameters
asn1_sdap_cfgE1AP ASN.1 config object.
Returns
The sdap_config object where the result of the conversion is stored.
287{
288 sdap_config_t sdap_cfg;
289
290 if (asn1_sdap_cfg.default_drb == asn1::e1ap::default_drb_opts::options::true_value) {
291 sdap_cfg.default_drb = true;
292 } else {
293 sdap_cfg.default_drb = false;
294 }
295
296 sdap_cfg.sdap_hdr_dl = e1ap_asn1_to_sdap_hdr_dl_cfg(asn1_sdap_cfg.sdap_hdr_dl);
297 sdap_cfg.sdap_hdr_ul = e1ap_asn1_to_sdap_hdr_ul_cfg(asn1_sdap_cfg.sdap_hdr_ul);
298
299 return sdap_cfg;
300}
Definition cu_types.h:150

◆ e1ap_asn1_to_sdap_hdr_dl_cfg()

sdap_hdr_dl_cfg srsran::e1ap_asn1_to_sdap_hdr_dl_cfg ( asn1::e1ap::sdap_hdr_dl_opts::options asn1_hdr_dl_opts)
inline
265{
266 sdap_hdr_dl_cfg hdr_cfg;
267
268 switch (asn1_hdr_dl_opts) {
269 case asn1::e1ap::sdap_hdr_dl_opts::absent:
270 hdr_cfg = sdap_hdr_dl_cfg::absent;
271 break;
272 case asn1::e1ap::sdap_hdr_dl_opts::present:
273 hdr_cfg = sdap_hdr_dl_cfg::present;
274 break;
275 default:
276 srsran_assertion_failure("Invalid SDAP-Header-DL option ({})", asn1_hdr_dl_opts);
277 hdr_cfg = {};
278 }
279
280 return hdr_cfg;
281}
sdap_hdr_dl_cfg
SDAP header options for DL.
Definition sdap_config.h:36

◆ e1ap_asn1_to_sdap_hdr_ul_cfg()

sdap_hdr_ul_cfg srsran::e1ap_asn1_to_sdap_hdr_ul_cfg ( asn1::e1ap::sdap_hdr_ul_opts::options asn1_hdr_ul_opts)
inline
246{
247 sdap_hdr_ul_cfg hdr_cfg;
248
249 switch (asn1_hdr_ul_opts) {
250 case asn1::e1ap::sdap_hdr_ul_opts::absent:
251 hdr_cfg = sdap_hdr_ul_cfg::absent;
252 break;
253 case asn1::e1ap::sdap_hdr_ul_opts::present:
254 hdr_cfg = sdap_hdr_ul_cfg::present;
255 break;
256 default:
257 srsran_assertion_failure("Invalid SDAP-Header-UL option ({})", asn1_hdr_ul_opts);
258 hdr_cfg = {};
259 }
260
261 return hdr_cfg;
262}
sdap_hdr_ul_cfg
SDAP header options for UL.
Definition sdap_config.h:33

◆ e1ap_asn1_to_snssai()

srsran::s_nssai_t srsran::e1ap_asn1_to_snssai ( asn1::e1ap::snssai_s asn1_snssai)
inline

Convert E1AP ASN1 s-NSSAI to s_nssai_t type.

Parameters
asn1_snssaiThe E1AP ASN1 s-NSSAI.
Returns
The s_nssai_t type object where the result of the conversion is stored.
173{
174 srsran::s_nssai_t snssai;
175 snssai.sst = asn1_snssai.sst.to_number();
176
177 if (asn1_snssai.sd_present) {
178 snssai.sd = asn1_snssai.sd.to_number();
179 }
180
181 return snssai;
182}
Definition s_nssai.h:30

◆ e1ap_cause_to_cause()

cause_t srsran::e1ap_cause_to_cause ( asn1::e1ap::cause_c e1ap_cause)
inline

Convert E1AP Cause to cause_t type.

Parameters
e1ap_causeThe E1AP Cause.
Returns
The cause type.
987{
988 cause_t cause;
989
990 switch (e1ap_cause.type()) {
991 case asn1::e1ap::cause_c::types_opts::radio_network:
992 cause = static_cast<cause_radio_network_t>(e1ap_cause.radio_network().value);
993 break;
994 case asn1::e1ap::cause_c::types_opts::transport:
995 cause = static_cast<cause_transport_t>(e1ap_cause.transport().value);
996 break;
997 case asn1::e1ap::cause_c::types_opts::protocol:
998 cause = static_cast<cause_protocol_t>(e1ap_cause.protocol().value);
999 break;
1000 case asn1::e1ap::cause_c::types_opts::misc:
1001 cause = static_cast<cause_misc_t>(e1ap_cause.misc().value);
1002 break;
1003 default:
1004 report_fatal_error("Cannot convert E1AP ASN.1 cause {} to common type", e1ap_cause.type());
1005 }
1006
1007 return cause;
1008}

◆ e1ap_drb_failed_item_list_to_asn1()

void srsran::e1ap_drb_failed_item_list_to_asn1 ( asn1::dyn_array< template_asn1_item > & asn1_drb_item_list,
const slotted_id_vector< drb_id_t, e1ap_drb_failed_item_ng_ran > & drb_failed_list_ng_ran )
inline
1329{
1330 for (const auto& drb_failed_item : drb_failed_list_ng_ran) {
1331 template_asn1_item asn1_drb_failed_item;
1332 // Add DRB ID
1333 asn1_drb_failed_item.drb_id = drb_id_to_uint(drb_failed_item.drb_id);
1334 // Add Cause
1335 asn1_drb_failed_item.cause = cause_to_asn1_cause(drb_failed_item.cause);
1336 asn1_drb_item_list.push_back(asn1_drb_failed_item);
1337 }
1338}
asn1::e1ap::cause_c cause_to_asn1_cause(cause_t cause)
Convert cause_t type to E1AP ASN.1 cause.
Definition e1ap_asn1_converters.h:1013

◆ e1ap_drb_item_list_to_asn1()

void srsran::e1ap_drb_item_list_to_asn1 ( asn1::dyn_array< template_asn1_item > & asn1_drb_item_list,
const slotted_id_vector< drb_id_t, e1ap_drb_setup_item_ng_ran > & drb_setup_list_ng_ran )
inline
1276{
1277 for (const auto& drb_setup_item_ng_ran : drb_setup_list_ng_ran) {
1278 template_asn1_item asn1_drb_setup_item;
1279
1280 // Add DRB ID
1281 asn1_drb_setup_item.drb_id = drb_id_to_uint(drb_setup_item_ng_ran.drb_id);
1282
1283 // Add UL UP Transport Params
1284 for (const auto& ul_up_transport_param : drb_setup_item_ng_ran.ul_up_transport_params) {
1285 asn1::e1ap::up_params_item_s asn1_up_transport_param;
1286 up_transport_layer_info_to_asn1(asn1_up_transport_param.up_tnl_info, ul_up_transport_param.up_tnl_info);
1287 asn1_drb_setup_item.ul_up_transport_params.push_back(asn1_up_transport_param);
1288 }
1289
1290 // Add Flow setup List
1291 for (const auto& qos_flow_item : drb_setup_item_ng_ran.flow_setup_list) {
1292 asn1::e1ap::qos_flow_item_s asn1_flow_item;
1293 asn1_flow_item.qos_flow_id = qos_flow_id_to_uint(qos_flow_item.qos_flow_id);
1294 asn1_drb_setup_item.flow_setup_list.push_back(asn1_flow_item);
1295 }
1296
1297 // Add Flow Failed List
1298 for (const auto& flow_failed_item : drb_setup_item_ng_ran.flow_failed_list) {
1299 asn1::e1ap::qos_flow_failed_item_s asn1_flow_failed_item;
1300 asn1_flow_failed_item.qos_flow_id = qos_flow_id_to_uint(flow_failed_item.qos_flow_id);
1301 asn1_drb_setup_item.flow_failed_list.push_back(asn1_flow_failed_item);
1302 }
1303
1304 // Add DRB Data Forwarding Info Response
1305 if (drb_setup_item_ng_ran.drb_data_forwarding_info_resp.has_value()) {
1306 asn1_drb_setup_item.drb_data_forwarding_info_resp_present = true;
1307 if (drb_setup_item_ng_ran.drb_data_forwarding_info_resp.value().ul_data_forwarding.has_value()) {
1308 asn1_drb_setup_item.drb_data_forwarding_info_resp.ul_data_forwarding_present = true;
1310 asn1_drb_setup_item.drb_data_forwarding_info_resp.ul_data_forwarding,
1311 drb_setup_item_ng_ran.drb_data_forwarding_info_resp.value().ul_data_forwarding.value());
1312 }
1313 if (drb_setup_item_ng_ran.drb_data_forwarding_info_resp.value().dl_data_forwarding.has_value()) {
1314 asn1_drb_setup_item.drb_data_forwarding_info_resp.dl_data_forwarding_present = true;
1316 asn1_drb_setup_item.drb_data_forwarding_info_resp.dl_data_forwarding,
1317 drb_setup_item_ng_ran.drb_data_forwarding_info_resp.value().dl_data_forwarding.value());
1318 }
1319 }
1320
1321 asn1_drb_item_list.push_back(asn1_drb_setup_item);
1322 }
1323}
constexpr uint8_t qos_flow_id_to_uint(qos_flow_id_t id)
Convert QoS Flow ID type to integer.
Definition cu_types.h:62
void up_transport_layer_info_to_asn1(Asn1Type &asn1obj, const up_transport_layer_info &up_tp_layer_info)
Converts type up_transport_layer_info to an ASN.1 type.
Definition up_transport_layer_info.h:50
Definition e1ap_ies.h:3512
Definition e1ap_ies.h:1400
Definition e1ap_ies.h:2249

◆ e2sm_kpm_label_2_str()

std::string srsran::e2sm_kpm_label_2_str ( e2sm_kpm_label_enum label)
28{
29 switch (label) {
30 case NO_LABEL:
31 return "NO_LABEL";
32 case PLMN_ID_LABEL:
33 return "PLMN_ID_LABEL";
34 case SLICE_ID_LABEL:
35 return "SLICE_ID_LABEL";
36 case FIVE_QI_LABEL:
37 return "FIVE_QI_LABEL";
38 case QFI_LABEL:
39 return "QFI_LABEL";
40 case QCI_LABEL:
41 return "QCI_LABEL";
42 case QCI_MAX_LABEL:
43 return "QCI_MAX_LABEL";
44 case QCI_MIN_LABEL:
45 return "QCI_MIN_LABEL";
46 case ARP_MAX_LABEL:
47 return "ARP_MAX_LABEL";
48 case ARP_MIN_LABEL:
49 return "ARP_MIN_LABEL";
50 case BITRATE_RANGE_LABEL:
51 return "BITRATE_RANGE_LABEL";
52 case LAYER_MU_MIMO_LABEL:
53 return "LAYER_MU_MIMO_LABEL";
54 case SUM_LABEL:
55 return "SUM_LABEL";
56 case DIST_BIN_X_LABEL:
57 return "DIST_BIN_X_LABEL";
58 case DIST_BIN_Y_LABEL:
59 return "DIST_BIN_Y_LABEL";
60 case DIST_BIN_Z_LABEL:
61 return "DIST_BIN_Z_LABEL";
62 case PRE_LABEL_OVERRIDE_LABEL:
63 return "PRE_LABEL_OVERRIDE_LABEL";
64 case START_END_IND_LABEL:
65 return "START_END_IND_LABEL";
66 case MIN_LABEL:
67 return "MIN_LABEL";
68 case MAX_LABEL:
69 return "MAX_LABEL";
70 case AVG_LABEL:
71 return "AVG_LABEL";
72 case SSB_IDX_LABEL:
73 return "SSB_IDX_LABEL";
74 case NON_GO_B_BFMODE_IDX_LABEL:
75 return "NON_GO_B_BFMODE_IDX_LABEL";
76 case MIMO_MODE_IDX_LABEL:
77 return "MIMO_MODE_IDX_LABEL";
78 case ALL_VALUE_TYPE_LABELS:
79 return "ALL_VALUE_TYPE_LABELS";
80 case ALL_SUBCOUNTER_LABELS:
81 return "ALL_SUBCOUNTER_LABELS";
82 case ALL_LABELS:
83 return "ALL_LABELS";
84 default:
85 return "UNKNOWN_LABEL";
86 }
87}

◆ e2sm_kpm_scope_2_str()

std::string srsran::e2sm_kpm_scope_2_str ( e2sm_kpm_metric_level_enum level)
90{
91 switch (level) {
92 case E2_NODE_LEVEL:
93 return "E2_NODE_LEVEL";
94 case UE_LEVEL:
95 return "UE_LEVEL";
96 case QOS_FLOW_LEVEL:
97 return "QOS_FLOW_LEVEL";
98 case ALL_LEVELS:
99 return "ALL_LEVELS";
100 default:
101 return "UNKNOWN_LEVEL";
102 }
103}

◆ enable_backtrace()

void srsran::enable_backtrace ( )

Enables the backtrace.

34{
35 // Ignore.
36}

◆ equalize_zf_1xn()

template<unsigned RX_PORTS>
void srsran::equalize_zf_1xn ( channel_equalizer::re_list & eq_symbols,
channel_equalizer::noise_var_list & noise_vars,
const channel_equalizer::re_list & ch_symbols,
const channel_equalizer::ch_est_list & ch_estimates,
float noise_var_est,
float tx_scaling )

Implementation of a Zero Forcing equalizer for a SIMO 1 X RX_PORTS channel.

Template Parameters
RX_PORTSNumber of receive antenna ports.
Parameters
[out]eq_symbolsResultant equalized symbols.
[out]noise_varsNoise variances after equalization.
[in]ch_symbolsChannel symbols, i.e., complex samples from the receive ports.
[in]ch_estimatesChannel estimation coefficients.
[in]noise_var_estEstimated noise variance. It is assumed to be the same for each receive port.
[in]tx_scalingTransmission gain scaling factor.
51{
52 // Number of RE to process.
53 unsigned nof_re = ch_symbols.get_dimension_size(channel_equalizer::re_list::dims::re);
54
55 // Views over the output data.
56 span<float> nvars_out = noise_vars.get_view({});
57 span<cf_t> symbols_out = eq_symbols.get_view({});
58
59 unsigned i_re = 0;
60
61#if defined(__AVX2__) || defined(HAVE_NEON)
62 // Views over the input data.
63 std::array<span<const cf_t>, MAX_PORTS> port_symbols;
64 std::array<span<const cf_t>, MAX_PORTS> port_ests;
65
66 for (unsigned i_port = 0; i_port != RX_PORTS; ++i_port) {
67 port_symbols[i_port] = ch_symbols.get_view({i_port});
68 port_ests[i_port] = ch_estimates.get_view({i_port, 0});
69 }
70
71 // Create registers with zero and infinity values.
72 simd_f_t zero = srsran_simd_f_zero();
73 simd_f_t infinity = srsran_simd_f_set1(std::numeric_limits<float>::infinity());
74
75 for (unsigned i_re_end = (nof_re / SRSRAN_SIMD_CF_SIZE) * SRSRAN_SIMD_CF_SIZE; i_re != i_re_end;
76 i_re += SRSRAN_SIMD_CF_SIZE) {
77 simd_f_t ch_mod_sq = srsran_simd_f_zero();
78 simd_cf_t re_out = srsran_simd_cf_zero();
79
80 for (unsigned i_port = 0; i_port != RX_PORTS; ++i_port) {
81 // Get the input RE and channel estimate coefficients.
82 simd_cf_t re_in = srsran_simd_cfi_loadu(&(port_symbols[i_port][i_re]));
83 simd_cf_t ch_est = srsran_simd_cfi_loadu(&(port_ests[i_port][i_re]));
84
85 // Compute the channel square norm, by accumulating the channel square absolute values.
86 ch_mod_sq = srsran_simd_f_add(ch_mod_sq, srsran_simd_cf_norm_sq(ch_est));
87
88 // Apply the matched channel filter to each received RE and accumulate the results.
89 re_out = srsran_simd_cf_add(re_out, srsran_simd_cf_conjprod(re_in, ch_est));
90 }
91
92 // Calculate the denominator of the pseudo-inverse.
93 simd_f_t d_pinv = srsran_simd_f_mul(srsran_simd_f_set1(tx_scaling), ch_mod_sq);
94
95 // Compute reciprocal of the denominator.
96 simd_f_t d_pinv_rcp = srsran_simd_f_rcp(d_pinv);
97
98 // Detect abnormal computation parameters. This detects whenever the channel estimate is zero or NaN.
99 simd_sel_t isnormal_mask = srsran_simd_f_max(d_pinv, zero);
100
101 // Detect abnormal computation parameters. This detects whenever the channel estimate is infinity.
102 isnormal_mask = srsran_simd_sel_and(isnormal_mask, srsran_simd_f_max(infinity, d_pinv));
103
104 // Calculate noise variances.
105 simd_f_t vars_out = srsran_simd_f_mul(d_pinv_rcp, srsran_simd_f_set1(noise_var_est / tx_scaling));
106
107 // Detect whenever the post-equalization noise variances are zero, negative or NaN.
108 isnormal_mask = srsran_simd_sel_and(isnormal_mask, srsran_simd_f_max(vars_out, zero));
109
110 // Detect whenever the post-equalizatino noise variances are set to infinity.
111 isnormal_mask = srsran_simd_sel_and(isnormal_mask, srsran_simd_f_max(infinity, vars_out));
112
113 // If abnormal calculation parameters are detected, the noise variances are set to infinity.
114 srsran_simd_f_storeu(&nvars_out[i_re], srsran_simd_f_select(infinity, vars_out, isnormal_mask));
115
116 // Normalize the gain of the channel combined with the equalization to unity.
117 re_out = srsran_simd_cf_mul(re_out, d_pinv_rcp);
118
119 // If abnormal calculation parameters are detected, the equalized symbols are set to zero.
120 srsran_simd_cfi_storeu(&symbols_out[i_re],
121 srsran_simd_cf_select(srsran_simd_cf_set1({0, 0}), re_out, isnormal_mask));
122 }
123#endif // __AVX2__ || HAVE_NEON
124
125 for (; i_re != nof_re; ++i_re) {
126 float ch_mod_sq = 0.0F;
127 cf_t re_out = 0.0F;
128
129 for (unsigned i_port = 0; i_port != RX_PORTS; ++i_port) {
130 // Get the input RE and channel estimate coefficient.
131 cf_t re_in = ch_symbols[{i_re, i_port}];
132 cf_t ch_est = ch_estimates[{i_re, i_port}];
133
134 // Compute the channel square norm, by accumulating the channel square absolute values.
135 ch_mod_sq += abs_sq(ch_est);
136
137 // Apply the matched channel filter to each received RE and accumulate the results.
138 re_out += re_in * std::conj(ch_est);
139 }
140
141 // Return values in case of abnormal computation parameters. These include negative, zero, NAN or INF noise
142 // variances and zero, NAN or INF channel estimation coefficients.
143 symbols_out[i_re] = 0;
144 nvars_out[i_re] = std::numeric_limits<float>::infinity();
145
146 float d_pinv = tx_scaling * ch_mod_sq;
147
148 if (std::isnormal(d_pinv) && std::isnormal(noise_var_est) && (noise_var_est > 0.0F)) {
149 // Calculate the reciprocal of the denominator.
150 float d_pinv_rcp = 1.0F / d_pinv;
151
152 // Normalize the gain of the channel combined with the equalization to unity.
153 symbols_out[i_re] = re_out * d_pinv_rcp;
154
155 // Calculate noise variances.
156 nvars_out[i_re] = d_pinv_rcp * (noise_var_est / tx_scaling);
157 }
158 }
159}
unsigned get_dimension_size(Index_type i_dimension) const
Gets a specific dimension size.
Definition tensor.h:107
span< Type > get_view(const std::array< unsigned, NDIMS - N > &indices)
Gets a view of the lowest N dimensions.
Definition tensor.h:60
constexpr float abs_sq(cf_t x)
Calculates the squared modulus of a complex value.
Definition math_utils.h:70
Here is the call graph for this function:

◆ equalize_zf_2x2()

void srsran::equalize_zf_2x2 ( channel_equalizer::re_list & eq_symbols,
channel_equalizer::noise_var_list & noise_vars,
const channel_equalizer::re_list & ch_symbols,
const channel_equalizer::ch_est_list & ch_estimates,
float noise_var_est,
float tx_scaling )

Implementation of a Zero Forcing equalizer algorithm for a MIMO 2 X 2 channel.

Parameters
[out]eq_symbolsResultant equalized symbols.
[out]noise_varsNoise variances after equalization.
[in]ch_symbolsChannel symbols, i.e., complex samples from the receive ports.
[in]ch_estimatesChannel estimation coefficients.
[in]noise_var_estEstimated noise variance. It is assumed to be the same for each receive port.
[in]tx_scalingTransmission gain scaling factor.
37{
38 // Views over equalized symbols, organized by transmit layer.
39 span<cf_t> symbols_out_l0 = eq_symbols.get_view<>({0});
40 span<cf_t> symbols_out_l1 = eq_symbols.get_view<>({1});
41
42 // Views over post-equalization noise variances, organized by transmit layer.
43 span<float> eq_noise_vars_l0 = noise_vars.get_view<>({0});
44 span<float> eq_noise_vars_l1 = noise_vars.get_view<>({1});
45
46 // Views over input channel symbols, organized by receive port.
49
50 // Views over channel estimates, organized by receive port and transmit layer.
51 span<const cf_t> ch_estimates_p0_l0 = ch_estimates.get_view<>({0, 0});
52 span<const cf_t> ch_estimates_p0_l1 = ch_estimates.get_view<>({0, 1});
53 span<const cf_t> ch_estimates_p1_l0 = ch_estimates.get_view<>({1, 0});
54 span<const cf_t> ch_estimates_p1_l1 = ch_estimates.get_view<>({1, 1});
55
56 const unsigned nof_re = ch_symbols.get_dimension_size(channel_equalizer::re_list::dims::re);
57
58 for (unsigned i_re = 0; i_re != nof_re; ++i_re) {
59 // Channel estimates.
64
65 // Conjugated channel estimates.
66 cf_t ch_p0_l0_conj = std::conj(ch_p0_l0);
67 cf_t ch_p0_l1_conj = std::conj(ch_p0_l1);
68 cf_t ch_p1_l0_conj = std::conj(ch_p1_l0);
69 cf_t ch_p1_l1_conj = std::conj(ch_p1_l1);
70
71 // Absolute squares of the channel estimates.
76
77 // Input Resource Elements.
80
81 // Calculate the product of the channel matrix and its hermitian transpose.
82 // The diagonal coefficients are the squared norms of the channel matrix column vectors.
85
86 // Calculate the anti-diagonal coefficients, which are -xi and -xi_conj.
88 cf_t xi_conj = std::conj(xi);
89 float xi_mod_sq = abs_sq(xi);
90
91 // Apply a matched filter for each transmit layer to the input signal.
94
95 // Calculate the reciprocal of the denominators. Set the symbols to zero in case of division by zero, NAN of INF.
97 float d_nvars = tx_scaling * d_pinv;
98
99 // Return values in case of abnormal computation parameters. These include negative, zero, NAN or INF noise
100 // variances and zero, NAN or INF channel estimation coefficients.
101 symbols_out_l0[i_re] = 0;
102 symbols_out_l1[i_re] = 0;
103 eq_noise_vars_l0[i_re] = std::numeric_limits<float>::infinity();
104 eq_noise_vars_l1[i_re] = std::numeric_limits<float>::infinity();
105
106 if (std::isnormal(d_pinv) && std::isnormal(noise_var_est) && (noise_var_est > 0.0F)) {
107 float d_pinv_rcp = 1.0F / d_pinv;
108 float d_nvars_rcp = 1.0F / d_nvars;
109
110 // Apply Zero Forcing algorithm. This is equivalent to multiplying the input signal with the pseudo-inverse of the
111 // channel matrix.
114
115 // Calculate post-equalization noise variances.
118 }
119 }
120}
Here is the call graph for this function:

◆ estimate_required_nof_prbs()

unsigned srsran::estimate_required_nof_prbs ( const prbs_calculator_sch_config & sch_config,
unsigned max_nof_available_rbs = 273U )

Computes a coarse estimate of the number of required PRBs to transmit a given payload size. This estimate might lead to a TBS that is smaller or larger than the given payload size.

Obtain an initial estimate for the minimum number of PRBs needed so that the TBS >= payload size.

Parameters
[in]sch_configis a struct with the PDSCH configuration to compute the num. of PRBs.
[in]max_nof_available_rbsis the maximum number or available of PRBs within the BWP. By default, this is set to the maximum number of RBs for FR1, as per Table 5.3.2-1, TS 38.104.
Returns
estimate of the number of PRBs.
50{
51 // Convert size into bits, as per TS procedures for TBS.
52 unsigned payload_size = sch_config.payload_size_bytes * NOF_BITS_PER_BYTE;
53
55 static const unsigned payload_step_threshold = 3824;
56 if (payload_size >= payload_step_threshold) {
57 nof_info_estimate = estimate_nof_info_payload_higher_3824_bits(payload_size, sch_config.mcs_descr.target_code_rate);
58 } else {
59 // This is an estimate of the N_info (as per Section 5.1.3.2, TS 38.214), approximated as the TBS that is greater or
60 // equal to the payload size. This guarantees that the estimated num. of PRBs we obtained yields a TBS that is
61 // greater or equal to the payload.
63 }
64
65 unsigned nof_bit_per_symbol = get_bits_per_symbol(sch_config.mcs_descr.modulation);
66
67 // Get N_re (as per Section 5.1.3.2, TS 38.214) from N_info.
68 float nof_re =
69 nof_info_estimate / (sch_config.mcs_descr.get_normalised_target_code_rate() *
70 static_cast<float>(nof_bit_per_symbol) * static_cast<float>(sch_config.nof_layers) *
72
73 // N_info_prime as per Section 5.1.3.2, TS 38.214.
74 int nof_re_prime = static_cast<int>(NOF_SUBCARRIERS_PER_RB) * static_cast<int>(sch_config.nof_symb_sh) -
75 static_cast<int>(sch_config.nof_dmrs_prb) - static_cast<int>(sch_config.nof_oh_prb);
76 srsran_assert(nof_re_prime > 0, "nof_re_prime is expected to be positive");
77
78 // Get the estimated number of PRBs from the N_re and N_info_prime. Cap the returned value to the maximum nof RBs for
79 // FR1.
80 return std::min(max_nof_available_rbs,
81 divide_ceil(static_cast<unsigned>(nof_re), std::min(static_cast<unsigned>(nof_re_prime), 156U)));
82}
float tbs_calculator_pdsch_get_scaling_factor(unsigned scaling)
Converts TB scaling field into the scaling factor S (see TS38.214 Table 5.1.3.2-2).
Definition tbs_calculator.cpp:77
constexpr unsigned divide_ceil(unsigned num, unsigned den)
Performs an integer division rounding up.
Definition math_utils.h:41
unsigned tbs_calculator_table_find_smallest_not_less_than(unsigned nof_info_prime)
Gets the smallest TBS in bits (from TS 38.214 Table 5.1.3.2-1) greater than or equal to a given value...
Definition tbs_calculator.cpp:83
constexpr unsigned get_bits_per_symbol(modulation_scheme mod)
Bits per symbol for a given modulation scheme.
Definition modulation_scheme.h:100

◆ execute_on()

template<typename TaskExecutor >
auto srsran::execute_on ( TaskExecutor & exec)

Awaiter that switches to execution context provided by given executor.

33{
34 struct task_executor_awaiter {
35 task_executor_awaiter(TaskExecutor& exec_) : exec(exec_) {}
36
37 bool await_ready() noexcept { return false; }
38
39 void await_suspend(coro_handle<> suspending_awaitable)
40 {
41 bool res = exec.execute([this, suspending_awaitable]() mutable {
42 success = true;
43 suspending_awaitable.resume();
44 });
45 if (not res) {
46 // Failed to dispatch task. Resume it from current thread, but with "success == false".
47 success = false;
48 suspending_awaitable.resume();
49 }
50 }
51
52 bool await_resume() { return success; }
53
54 task_executor_awaiter& get_awaiter() { return *this; }
55
56 private:
57 TaskExecutor& exec;
58 bool success;
59 };
60
61 return task_executor_awaiter{exec};
62}

◆ fill_asn1_e2ap_setup_request()

void srsran::fill_asn1_e2ap_setup_request ( asn1::e2ap::e2setup_request_s & setup,
const e2ap_configuration & e2ap_config,
e2sm_manager & e2sm_mngr )
inline
66{
67 using namespace asn1::e2ap;
68 srslog::basic_logger& logger = srslog::fetch_basic_logger("E2");
69 e2_message e2_msg;
70 init_msg_s& initmsg = e2_msg.pdu.set_init_msg();
71 initmsg.load_info_obj(ASN1_E2AP_ID_E2SETUP);
72 setup = initmsg.value.e2setup_request();
73
74 // Transaction ID
75 setup->transaction_id.crit = asn1::crit_opts::reject;
76 setup->transaction_id.value.value = 1;
77
78 // Global e2 node ID
79 setup->global_e2node_id.crit = asn1::crit_opts::reject;
80 auto& gnb_id = setup->global_e2node_id.value.set_gnb();
81 gnb_id.global_g_nb_id.gnb_id.gnb_id().from_number(e2ap_config.gnb_id, 28);
82 // convert PLMN to BCD
83 uint32_t plmn_bcd = plmn_string_to_bcd(e2ap_config.plmn);
84 gnb_id.global_g_nb_id.plmn_id.from_number(plmn_bcd);
85
86 // RAN functions added
87 setup->ra_nfunctions_added.crit = asn1::crit_opts::reject;
88 setup->ra_nfunctions_added.id = ASN1_E2AP_ID_RA_NFUNCTIONS_ADDED;
89 if (e2ap_config.e2sm_kpm_enabled) {
90 std::string ran_oid = e2sm_kpm_asn1_packer::oid;
91 logger.info("Generate RAN function definition for OID: {}", ran_oid.c_str());
92 e2sm_interface* e2_iface = e2sm_mngr.get_e2sm_interface(ran_oid);
93 if (e2_iface) {
94 fill_ran_function_item(setup, ran_oid, e2_iface);
95 } else {
96 logger.error("No E2SM interface found for RAN OID {}", ran_oid.c_str());
97 }
98 }
99 if (e2ap_config.e2sm_rc_enabled) {
100 std::string ran_oid = e2sm_rc_asn1_packer::oid;
101 logger.info("Generate RAN function definition for OID: {}", ran_oid.c_str());
102 e2sm_interface* e2_iface = e2sm_mngr.get_e2sm_interface(ran_oid);
103 if (e2_iface) {
104 fill_ran_function_item(setup, ran_oid, e2_iface);
105 } else {
106 logger.error("No E2SM interface found for RAN OID {}", ran_oid.c_str());
107 }
108 }
109
110 // E2 node component config
111 setup->e2node_component_cfg_addition.crit = asn1::crit_opts::reject;
112 auto& list = setup->e2node_component_cfg_addition.value;
113 list.resize(1);
114 list[0].load_info_obj(ASN1_E2AP_ID_E2NODE_COMPONENT_CFG_ADDITION_ITEM);
115 e2node_component_cfg_addition_item_s& e2node_cfg_item = list[0].value().e2node_component_cfg_addition_item();
116 e2node_cfg_item.e2node_component_interface_type = e2node_component_interface_type_opts::ng;
117 e2node_cfg_item.e2node_component_id.set_e2node_component_interface_type_ng().amf_name.from_string("nginterf");
118 e2node_cfg_item.e2node_component_cfg.e2node_component_request_part.from_string("72657170617274");
119 e2node_cfg_item.e2node_component_cfg.e2node_component_resp_part.from_string("72657370617274");
120}
Definition logger.h:37
Definition e2sm.h:150
e2sm_interface * get_e2sm_interface(std::string oid)
Gets the e2sm service interface associated with the given oid.
Definition e2sm_manager.cpp:36
Definition e2ap.h:4332
Definition e2_messages.h:29

◆ fill_e1ap_cu_up_e1_setup_request()

void srsran::fill_e1ap_cu_up_e1_setup_request ( cu_up_e1_setup_request & req,
const asn1::e1ap::gnb_cu_up_e1_setup_request_s & asn1_req )
inline
34{
35 req.gnb_cu_up_id = asn1_req->gnb_cu_up_id;
36
37 if (asn1_req->gnb_cu_up_name_present) {
38 req.gnb_cu_up_name = asn1_req->gnb_cu_up_name.to_string();
39 }
40
41 req.cn_support = static_cast<cu_up_cn_support_t>(asn1_req->cn_support.value);
42
43 for (const auto& asn1_plmn_item : asn1_req->supported_plmns) {
44 supported_plmns_item_t plmn;
45 plmn.plmn_id = asn1_plmn_item.plmn_id.to_string();
46
47 for (const auto& asn1_slice_support_item : asn1_plmn_item.slice_support_list) {
48 slice_support_item_t slice_support;
49 slice_support.s_nssai.sst = asn1_slice_support_item.snssai.sst.to_number();
50
51 if (asn1_slice_support_item.snssai.sd_present) {
52 slice_support.s_nssai.sd = asn1_slice_support_item.snssai.sd.to_number();
53 }
54
55 plmn.slice_support_list.push_back(slice_support);
56 }
57
58 for (const auto& asn1_nr_cgi_support_item : asn1_plmn_item.nr_cgi_support_list) {
59 nr_cgi_support_item_t nr_cgi_support;
60 nr_cgi_support.nr_cgi = e1ap_asn1_to_cgi(asn1_nr_cgi_support_item.nr_cgi);
61
62 plmn.nr_cgi_support_list.push_back(nr_cgi_support);
63 }
64
65 if (asn1_plmn_item.qos_params_support_list_present) {
66 // We only support ng ran qos support list
67 for (const auto& asn1_qos_support_item : asn1_plmn_item.qos_params_support_list.ng_ran_qos_support_list) {
68 ng_ran_qos_support_item_t qos_support_item;
69
70 qos_support_item.non_dyn_5qi_descriptor.five_qi =
71 uint_to_five_qi(asn1_qos_support_item.non_dyn_5qi_descriptor.five_qi);
72
73 if (asn1_qos_support_item.non_dyn_5qi_descriptor.qos_prio_level_present) {
74 qos_support_item.non_dyn_5qi_descriptor.qos_prio_level =
75 uint_to_qos_prio_level(asn1_qos_support_item.non_dyn_5qi_descriptor.qos_prio_level);
76 }
77 if (asn1_qos_support_item.non_dyn_5qi_descriptor.averaging_win_present) {
78 qos_support_item.non_dyn_5qi_descriptor.averaging_win =
79 asn1_qos_support_item.non_dyn_5qi_descriptor.averaging_win;
80 }
81 if (asn1_qos_support_item.non_dyn_5qi_descriptor.max_data_burst_volume_present) {
82 qos_support_item.non_dyn_5qi_descriptor.max_data_burst_volume =
83 asn1_qos_support_item.non_dyn_5qi_descriptor.max_data_burst_volume;
84 }
85
86 plmn.ng_ran_qos_support_list.push_back(qos_support_item);
87 }
88 }
89
90 req.supported_plmns.push_back(plmn);
91 }
92
93 if (asn1_req->gnb_cu_up_capacity_present) {
94 req.gnb_cu_up_capacity = asn1_req->gnb_cu_up_capacity;
95 }
96}
nr_cell_global_id_t e1ap_asn1_to_cgi(const asn1::e1ap::nr_cgi_s &asn1_cgi)
Convert E1AP ASN.1 CGI to nr_cell_global_id_t type.
Definition e1ap_asn1_converters.h:1057

◆ fill_ran_function_item()

void srsran::fill_ran_function_item ( asn1::e2ap::e2setup_request_s & setup,
const std::string & ran_oid,
e2sm_interface * e2_iface )
inline
43{
44 using namespace asn1::e2ap;
45 srslog::basic_logger& logger = srslog::fetch_basic_logger("E2");
47 ran_func_item.load_info_obj(ASN1_E2AP_ID_RA_NFUNCTION_ITEM);
48 auto& ran_function_item = ran_func_item->ra_nfunction_item();
49
50 ran_func_item.value().ra_nfunction_item().ran_function_id =
51 (ran_oid == e2sm_kpm_asn1_packer::oid) ? e2sm_kpm_asn1_packer::ran_func_id : e2sm_rc_asn1_packer::ran_func_id;
52 ran_func_item.value().ra_nfunction_item().ran_function_revision = 0;
53 ran_func_item.value().ra_nfunction_item().ran_function_oid.from_string(ran_oid);
54
55 ran_function_item.ran_function_definition = e2_iface->get_e2sm_packer().pack_ran_function_description();
56 if (ran_function_item.ran_function_definition.size()) {
57 setup->ra_nfunctions_added.value.push_back(ran_func_item);
58 } else {
59 logger.error("Failed to pack RAN function description");
60 }
61}
virtual asn1::unbounded_octstring< true > pack_ran_function_description()=0
Pack the RAN function description.
virtual e2sm_handler & get_e2sm_packer()=0
gets a reference to the packer for this service model.
Definition e2sm_rc_asn1_packer.h:35
Definition asn1_ap_utils.h:112

◆ find_disconnected_id()

template<typename RangeSet , typename Range , typename SetValueType = typename RangeSet::value_type, typename ValueType = typename Range::value_type, typename IdType , typename IdList >
optional< IdType > srsran::find_disconnected_id ( const RangeSet & set,
const Range & r,
IdList SetValueType::* id_set_list,
IdType ValueType::* idfield )

Find an ID in id_set_list of set that is not present in range r.

Parameters
setList of sets of resources.
rList of resources.
id_set_listMember pointer to the list of resources belonging to a set.
idfieldMember pointer to a resource ID.
Returns
An resource Id belonging to a set which was not found in the list of resources r. If all resource Ids in the set are present in r, then an empty optional is returned.
100{
101 for (const auto& es : set) {
102 for (const auto& id : es.*id_set_list) {
103 if (std::none_of(r.begin(), r.end(), [&](const auto& er) { return er.*idfield == id; })) {
104 return id;
105 }
106 }
107 }
108 return {};
109}

◆ find_first_lsb_one()

template<typename Integer >
Integer srsran::find_first_lsb_one ( Integer value)

Finds the position of the first bit set to one, starting from the LSB.

Template Parameters
IntegerInteger type of received bitmap.
Parameters
[in]valueInteger bitmap
Returns
LSB position with the bit set to one. The LSB has position zero.

◆ find_first_msb_one()

template<typename Integer >
Integer srsran::find_first_msb_one ( Integer value)

Finds the position of the first bit set to one, starting from the MSB.

Template Parameters
IntegerInteger type of received bitmap.
Parameters
[in]valueInteger bitmap
Returns
MSB position with the bit set to one. The MSB has position sizeof(Integer) * 8 - 1.
226{
227 return (value) ? (sizeof(Integer) * 8U - 1 - detail::bitset_builtin_helper<Integer>::zero_msb_count(value))
228 : std::numeric_limits<Integer>::digits;
229}

◆ find_next_tdd_full_ul_slot()

optional< unsigned > srsran::find_next_tdd_full_ul_slot ( const tdd_ul_dl_config_common & cfg,
unsigned start_slot_index = 0 )

Finds the next TDD slot index with all UL symbols, starting from the given slot index.

113{
114 const unsigned period = nof_slots_per_tdd_period(cfg);
115
117 for (unsigned i = start_slot_index; i < period; ++i) {
119 ret = i;
120 break;
121 }
122 }
123 return ret;
124}
@ NORMAL
Indicates normal cyclic prefix length.
Definition cyclic_prefix.h:41
const unsigned NOF_OFDM_SYM_PER_SLOT_NORMAL_CP
The number of OFDM symbols per slot is constant for all numerologies.
Definition frame_types.h:30
unsigned nof_slots_per_tdd_period(const tdd_ul_dl_config_common &cfg)
Calculates number of slots, using TDD reference SCS, of the TDD UL-DL configuration.
Definition tdd_ul_dl_config.h:56
ofdm_symbol_range get_active_tdd_ul_symbols(const tdd_ul_dl_config_common &cfg, unsigned slot_index, cyclic_prefix cp)
Calculates the number of active UL symbols in the current slot_index.
Definition tdd_ul_dl_config.cpp:91

◆ find_next_tdd_ul_slot()

optional< unsigned > srsran::find_next_tdd_ul_slot ( const tdd_ul_dl_config_common & cfg,
unsigned start_slot_index = 0 )

Finds the next TDD slot index with UL symbols, starting from the given slot index.

99{
100 const unsigned period = nof_slots_per_tdd_period(cfg);
101
103 for (unsigned i = start_slot_index; i < period; ++i) {
104 if (has_active_tdd_ul_symbols(cfg, i)) {
105 ret = i;
106 break;
107 }
108 }
109 return ret;
110}
bool has_active_tdd_ul_symbols(const tdd_ul_dl_config_common &cfg, unsigned slot_index)
Calculates whether there are symbols for UL in the current slot index.
Definition tdd_ul_dl_config.cpp:68

◆ five_qi_to_uint()

constexpr uint16_t srsran::five_qi_to_uint ( five_qi_t five_qi)
inlineconstexpr

Convert Five QI type to integer.

38{
39 return static_cast<uint16_t>(five_qi);
40}

◆ fliplr()

template<size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N, LowestInfoBitIsMSB > srsran::fliplr ( const bounded_bitset< N, LowestInfoBitIsMSB > & other)
inlinenoexcept

Flip bits from left to right.

Returns
new bounded_bitset that results from the fliplr operation.
1394{
1395 bounded_bitset<N, LowestInfoBitIsMSB> ret(other.size());
1396 for (uint32_t i = 0; i < ret.size(); ++i) {
1397 if (other.test(i)) {
1398 ret.set(ret.size() - 1 - i);
1399 }
1400 }
1401 return ret;
1402}

◆ fold_and_accumulate() [1/2]

template<size_t N2, size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N2, LowestInfoBitIsMSB > srsran::fold_and_accumulate ( const bounded_bitset< N, LowestInfoBitIsMSB > & other,
size_t fold_length )
inlinenoexcept

Performs the fold and accumulate operation, but without slicing at the end.

Template Parameters
N2maximum bitset size for returned bitset.
LowestInfoBitIsMSBinternal bit order representation of returned bitset.
Parameters
[in]otheroriginal bitset from where folds are generated.
[in]fold_lengthlength of each fold bitset.
Returns
bitset of size fold_length with the accumulated folds.
1447{
1448 return fold_and_accumulate<N2, N, LowestInfoBitIsMSB>(other, fold_length, 0, fold_length);
1449}

◆ fold_and_accumulate() [2/2]

template<size_t N2, size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N2, LowestInfoBitIsMSB > srsran::fold_and_accumulate ( const bounded_bitset< N, LowestInfoBitIsMSB > & other,
size_t fold_length,
size_t slice_offset,
size_t slice_length )
inlinenoexcept

Divides a bitset of size "S" into "M" smaller bitsets, where each bitset has length "L=S/M". A bitwise-or operation is performed across bitsets. At the end, a slice with an offset "O" and length "K" is taken from the bitset of length "L" that resulted from the bitwise-or operation. This operation is equivalent to reshaping an array of bits of size "S" into a matrix of dimensions "(M, L)" and applying an "or" operation across all bits of each column. The resulting array of "L" bits, is then sliced with an offset "O" and length "K". The operation asserts if "S % L != 0". E.g. Consider the bitset 1000 0100 0000 1001 (S=16), L=4, O=1, K=2. This function performs the following steps:

  1. Break the bitset into M=S/L=4 parts: {1000, 0100, 0000, 1001}.
  2. Bitwise-or all the M parts: 1101.
  3. Slice the bitset obtained in 2. with offset O=1 and slice length K=2: 10.
Template Parameters
N2maximum bitset size for returned bitset.
Parameters
[in]otheroriginal bitset of length "S".
[in]fold_lengthlength of each folded bitset "L".
[in]slice_offsetoffset from where to slice each fold "O".
[in]slice_lengthlength of the slice taken from each fold "K".
Returns
bitset of size slice_length with the or-accumulated folds.
1427{
1428 srsran_assert(
1429 other.size() % fold_length == 0, "Invalid fold length={} for bitset of size={}", fold_length, other.size());
1431 for (size_t i = 0; i != other.size(); i += fold_length) {
1432 ret |= other.template slice<N2>(i + slice_offset, i + slice_offset + slice_length);
1433 }
1434 return ret;
1435}

◆ force_blocking_execute()

void srsran::force_blocking_execute ( Exec && exec,
Task && task,
OnTaskDispatchFailure && fail_func,
unsigned max_attempts = std::numeric_limits<unsigned>::max() )

Forces the dispatch of a task and its execution to completion.

The user should be only use this call in exceptional situations where a blocking call is required.

109{
110 static_assert(std::is_copy_constructible<Task>::value, "Task must be copy assignable");
111
112 // Create a sync executor that will block the thread until the task is executed.
113 sync_task_executor<Exec> sync_task_exec(std::forward<Exec>(exec));
114
115 for (unsigned count = 0; count < max_attempts and not sync_task_exec.execute(task); ++count) {
116 fail_func();
117 }
118}
Blocks the thread calling execute() or defer() until the execution of the pushed task has been comple...
Definition sync_task_executor.h:35

◆ format1_cp_step_to_uint()

unsigned srsran::format1_cp_step_to_uint ( nof_cyclic_shifts opt)
inline
46{
47 return static_cast<unsigned>(opt);
48}

◆ from_number() [1/2]

bool srsran::from_number ( rlc_am_sn_size & sn_size,
uint16_t num )
inline
92{
93 if (num == 12) {
94 sn_size = rlc_am_sn_size::size12bits;
95 return true;
96 }
97 if (num == 18) {
98 sn_size = rlc_am_sn_size::size18bits;
99 return true;
100 }
101 return false;
102}

◆ from_number() [2/2]

bool srsran::from_number ( rlc_um_sn_size & sn_size,
uint16_t num )
inline
69{
70 if (num == 6) {
71 sn_size = rlc_um_sn_size::size6bits;
72 return true;
73 }
74 if (num == 12) {
75 sn_size = rlc_um_sn_size::size12bits;
76 return true;
77 }
78 return false;
79}

◆ from_string() [1/3]

bool srsran::from_string ( confidentiality_protection_indication_t & confidentiality_protection_ind,
const std::string & str )
inline
187{
188 if (str == "required") {
189 confidentiality_protection_ind = confidentiality_protection_indication_t::required;
190 return true;
191 }
192 if (str == "preferred") {
193 confidentiality_protection_ind = confidentiality_protection_indication_t::preferred;
194 return true;
195 }
196 if (str == "not_needed") {
197 confidentiality_protection_ind = confidentiality_protection_indication_t::not_needed;
198 return true;
199 }
200 return false;
201}

◆ from_string() [2/3]

bool srsran::from_string ( integrity_protection_indication_t & integrity_protection_ind,
const std::string & str )
inline
169{
170 if (str == "required") {
171 integrity_protection_ind = integrity_protection_indication_t::required;
172 return true;
173 }
174 if (str == "preferred") {
175 integrity_protection_ind = integrity_protection_indication_t::preferred;
176 return true;
177 }
178 if (str == "not_needed") {
179 integrity_protection_ind = integrity_protection_indication_t::not_needed;
180 return true;
181 }
182 return false;
183}

◆ from_string() [3/3]

bool srsran::from_string ( rlc_mode & mode,
const std::string & str )
inline
38{
39 if (str == "am") {
40 mode = rlc_mode::am;
41 return true;
42 }
43 if (str == "um-bidir") {
44 mode = rlc_mode::um_bidir;
45 return true;
46 }
47 if (str == "um-unidir-ul") {
48 mode = rlc_mode::um_unidir_ul;
49 return true;
50 }
51 if (str == "um-unidir-dl") {
52 mode = rlc_mode::um_unidir_dl;
53 return true;
54 }
55 if (str == "tm") {
56 mode = rlc_mode::tm;
57 return true;
58 }
59 return false;
60}

◆ gcd()

template<typename Integer >
Integer srsran::gcd ( Integer a,
Integer b )

Calculates the greatest common divisor (GCD) of two integers.

33{
34 while (true) {
35 if (a == 0) {
36 return b;
37 }
38 b %= a;
39 if (b == 0) {
40 return a;
41 }
42 a %= b;
43 }
44}

◆ generate_cu_cp_config()

srs_cu_cp::cu_cp_configuration srsran::generate_cu_cp_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a CU-CP configuration.

113{
114 const base_cell_appconfig& cell = config.cells_cfg.front().cell;
115
116 srs_cu_cp::cu_cp_configuration out_cfg = config_helpers::make_default_cu_cp_config();
117 out_cfg.ngap_config.gnb_id = config.gnb_id;
118 out_cfg.ngap_config.ran_node_name = config.ran_node_name;
119 out_cfg.ngap_config.plmn = cell.plmn;
120 out_cfg.ngap_config.tac = cell.tac;
121 out_cfg.ngap_config.slice_configurations = config.slice_cfg;
122
123 out_cfg.rrc_config.force_reestablishment_fallback = config.cu_cp_cfg.rrc_config.force_reestablishment_fallback;
124 out_cfg.rrc_config.rrc_procedure_timeout_ms = config.cu_cp_cfg.rrc_config.rrc_procedure_timeout_ms;
125 out_cfg.rrc_config.int_algo_pref_list = generate_preferred_integrity_algorithms_list(config);
126 out_cfg.rrc_config.enc_algo_pref_list = generate_preferred_ciphering_algorithms_list(config);
127 out_cfg.rrc_config.drb_config = generate_cu_cp_qos_config(config);
128
129 if (!from_string(out_cfg.default_security_indication.integrity_protection_ind,
130 config.cu_cp_cfg.security_config.integrity_protection)) {
131 report_error("Invalid value for integrity_protection={}\n", config.cu_cp_cfg.security_config.integrity_protection);
132 }
133 if (!from_string(out_cfg.default_security_indication.confidentiality_protection_ind,
134 config.cu_cp_cfg.security_config.confidentiality_protection)) {
135 report_error("Invalid value for confidentiality_protection={}\n",
136 config.cu_cp_cfg.security_config.confidentiality_protection);
137 }
138
139 out_cfg.ue_config.inactivity_timer = std::chrono::seconds{config.cu_cp_cfg.inactivity_timer};
140 out_cfg.ue_config.max_nof_supported_ues = config.cu_cp_cfg.max_nof_dus * srsran::srs_cu_cp::MAX_NOF_UES_PER_DU;
141 out_cfg.ngap_config.ue_context_setup_timeout = std::chrono::seconds{config.cu_cp_cfg.ue_context_setup_timeout_s};
142 out_cfg.statistics_report_period = std::chrono::seconds{config.metrics_cfg.cu_cp_statistics_report_period};
143
144 out_cfg.mobility_config.mobility_manager_config.trigger_handover_from_measurements =
145 config.cu_cp_cfg.mobility_config.trigger_handover_from_measurements;
146
147 // Convert appconfig's cell list into cell manager type.
148 for (const auto& app_cfg_item : config.cu_cp_cfg.mobility_config.cells) {
151 meas_cfg_item.serving_cell_cfg.gnb_id = app_cfg_item.gnb_id;
152 meas_cfg_item.serving_cell_cfg.band = app_cfg_item.band;
153 meas_cfg_item.serving_cell_cfg.ssb_arfcn = app_cfg_item.ssb_arfcn;
154 if (app_cfg_item.ssb_scs.has_value()) {
155 meas_cfg_item.serving_cell_cfg.ssb_scs.emplace() =
156 to_subcarrier_spacing(std::to_string(app_cfg_item.ssb_scs.value()));
157 }
158 if (app_cfg_item.periodic_report_cfg_id.has_value()) {
159 meas_cfg_item.periodic_report_cfg_id =
160 srs_cu_cp::uint_to_report_cfg_id(app_cfg_item.periodic_report_cfg_id.value());
161 }
162 for (const auto& ncell : app_cfg_item.ncells) {
164 ncell_meas_cfg.nci = ncell.nr_cell_id;
165 for (const auto& report_id : ncell.report_cfg_ids) {
166 ncell_meas_cfg.report_cfg_ids.push_back(srs_cu_cp::uint_to_report_cfg_id(report_id));
167 }
168
169 meas_cfg_item.ncells.push_back(ncell_meas_cfg);
170 }
171 if (app_cfg_item.ssb_duration.has_value() && app_cfg_item.ssb_offset.has_value() &&
172 app_cfg_item.ssb_period.has_value()) {
173 // Add MTC config.
174 meas_cfg_item.serving_cell_cfg.ssb_mtc.emplace() = generate_rrc_ssb_mtc(
175 app_cfg_item.ssb_period.value(), app_cfg_item.ssb_offset.value(), app_cfg_item.ssb_duration.value());
176 }
177
178 // Store config.
179 out_cfg.mobility_config.meas_manager_config.cells[meas_cfg_item.serving_cell_cfg.nci] = meas_cfg_item;
180 }
181
182 // Convert report config.
183 for (const auto& report_cfg_item : config.cu_cp_cfg.mobility_config.report_configs) {
185
186 if (report_cfg_item.report_type == "periodical") {
188
189 periodical.rs_type = srs_cu_cp::rrc_nr_rs_type::ssb;
190 if (report_cfg_item.report_interval_ms.has_value()) {
191 periodical.report_interv = report_cfg_item.report_interval_ms.value();
192 } else {
193 periodical.report_interv = 1024;
194 }
195 periodical.report_amount = -1;
196 periodical.report_quant_cell.rsrp = true;
197 periodical.report_quant_cell.rsrq = true;
198 periodical.report_quant_cell.sinr = true;
199 periodical.max_report_cells = 4;
200
201 srs_cu_cp::rrc_meas_report_quant report_quant_rs_idxes;
202 report_quant_rs_idxes.rsrp = true;
203 report_quant_rs_idxes.rsrq = true;
204 report_quant_rs_idxes.sinr = true;
205 periodical.report_quant_rs_idxes = report_quant_rs_idxes;
206
207 periodical.max_nrof_rs_idxes_to_report = 4;
208 periodical.include_beam_meass = true;
209 periodical.use_allowed_cell_list = false;
210
211 report_cfg.periodical = periodical;
212 } else {
214
215 // event id
216 // A3 event config is currently the only supported event.
217 auto& event_a3 = event_trigger_cfg.event_id.event_a3.emplace();
218
219 if (report_cfg_item.a3_report_type.empty() or !report_cfg_item.a3_offset_db.has_value() or
220 !report_cfg_item.a3_hysteresis_db.has_value()) {
221 report_error("Invalid measurement report configuration.\n");
222 }
223
224 if (report_cfg_item.a3_report_type == "rsrp") {
225 event_a3.a3_offset.rsrp = report_cfg_item.a3_offset_db.value();
226 } else if (report_cfg_item.a3_report_type == "rsrq") {
227 event_a3.a3_offset.rsrq = report_cfg_item.a3_offset_db.value();
228 } else if (report_cfg_item.a3_report_type == "sinr") {
229 event_a3.a3_offset.sinr = report_cfg_item.a3_offset_db.value();
230 }
231
232 event_a3.report_on_leave = false;
233
234 event_a3.hysteresis = report_cfg_item.a3_hysteresis_db.value();
235 event_a3.time_to_trigger = report_cfg_item.a3_time_to_trigger_ms.value();
236
237 event_a3.use_allowed_cell_list = false;
238
239 event_trigger_cfg.rs_type = srs_cu_cp::rrc_nr_rs_type::ssb;
240 if (report_cfg_item.report_interval_ms.has_value()) {
241 event_trigger_cfg.report_interv = report_cfg_item.report_interval_ms.value();
242 } else {
243 event_trigger_cfg.report_interv = 1024;
244 }
245 event_trigger_cfg.report_amount = -1;
246 event_trigger_cfg.report_quant_cell.rsrp = true;
247 event_trigger_cfg.report_quant_cell.rsrq = true;
248 event_trigger_cfg.report_quant_cell.sinr = true;
249 event_trigger_cfg.max_report_cells = 4;
250
251 srs_cu_cp::rrc_meas_report_quant report_quant_rs_idxes;
252 report_quant_rs_idxes.rsrp = true;
253 report_quant_rs_idxes.rsrq = true;
254 report_quant_rs_idxes.sinr = true;
255 event_trigger_cfg.report_quant_rs_idxes = report_quant_rs_idxes;
256
257 report_cfg.event_triggered = event_trigger_cfg;
258 }
259
260 // Store config.
261 out_cfg.mobility_config.meas_manager_config
262 .report_config_ids[srs_cu_cp::uint_to_report_cfg_id(report_cfg_item.report_cfg_id)] = report_cfg;
263 }
264
265 if (!config_helpers::is_valid_configuration(out_cfg)) {
266 report_error("Invalid CU-CP configuration.\n");
267 }
268
269 return out_cfg;
270}
srs_cu_cp::rrc_ssb_mtc generate_rrc_ssb_mtc(unsigned period, unsigned offset, unsigned duration)
Converts and returns SSB periodicity, offset and duration into a valid SSB measurement and timing con...
Definition gnb_appconfig_translators.cpp:50
constexpr subcarrier_spacing to_subcarrier_spacing(unsigned numerology)
Convert numerology index ( ) to SCS.
Definition subcarrier_spacing.h:63
srsran::security::preferred_integrity_algorithms generate_preferred_integrity_algorithms_list(const gnb_appconfig &config)
Definition gnb_appconfig_translators.cpp:882
std::map< five_qi_t, srs_cu_cp::cu_cp_qos_config > generate_cu_cp_qos_config(const gnb_appconfig &config)
Converts and returns the given gnb application QoS configuration to a CU-CP configuration.
Definition gnb_appconfig_translators.cpp:961
srsran::security::preferred_ciphering_algorithms generate_preferred_ciphering_algorithms_list(const gnb_appconfig &config)
Definition gnb_appconfig_translators.cpp:922
Base cell configuration.
Definition gnb_appconfig.h:471
unsigned tac
TAC.
Definition gnb_appconfig.h:487
std::string plmn
Human readable full PLMN (without possible filler digit).
Definition gnb_appconfig.h:485
std::vector< s_nssai_t > slice_cfg
Network slice configuration.
Definition gnb_appconfig.h:1250
cu_cp_appconfig cu_cp_cfg
CU-CP configuration.
Definition gnb_appconfig.h:1231
metrics_appconfig metrics_cfg
Metrics configuration.
Definition gnb_appconfig.h:1221
std::string ran_node_name
Node name.
Definition gnb_appconfig.h:1227
std::vector< cell_appconfig > cells_cfg
Cell configuration.
Definition gnb_appconfig.h:1241
uint32_t gnb_id
gNodeB identifier.
Definition gnb_appconfig.h:1223
bool trigger_handover_from_measurements
Whether to start HO if neighbor cell measurements arrive.
Definition gnb_appconfig.h:710
unsigned rrc_procedure_timeout_ms
Definition gnb_appconfig.h:716
Essential parameters required to configure serving and neighbor cell measurements in the UE....
Definition cell_meas_manager_config.h:56
serving_cell_meas_config serving_cell_cfg
Serving cell measurement config.
Definition cell_meas_manager_config.h:57
Configuration passed to CU-CP.
Definition cu_cp_configuration.h:44
Definition cell_meas_manager_config.h:49
nr_cell_id_t nci
The NR cell identifier.
Definition cell_meas_manager_config.h:50
Definition meas_types.h:426
Definition meas_types.h:344
Definition meas_types.h:461
nr_cell_id_t nci
Definition cell_meas_manager_config.h:40

◆ generate_cu_cp_qos_config()

std::map< five_qi_t, srs_cu_cp::cu_cp_qos_config > srsran::generate_cu_cp_qos_config ( const gnb_appconfig & config)

Converts and returns the given gnb application QoS configuration to a CU-CP configuration.

962{
963 std::map<five_qi_t, srs_cu_cp::cu_cp_qos_config> out_cfg = {};
964 if (config.qos_cfg.empty()) {
965 out_cfg = config_helpers::make_default_cu_cp_qos_config_list();
966 return out_cfg;
967 }
968
969 for (const qos_appconfig& qos : config.qos_cfg) {
970 if (out_cfg.find(qos.five_qi) != out_cfg.end()) {
971 report_error("Duplicate 5QI configuration: {}\n", qos.five_qi);
972 }
973 // Convert PDCP config
974 pdcp_config& out_pdcp = out_cfg[qos.five_qi].pdcp;
975
976 // RB type
977 out_pdcp.rb_type = pdcp_rb_type::drb;
978
979 // RLC mode
980 rlc_mode mode = {};
981 if (!from_string(mode, qos.rlc.mode)) {
982 report_error("Invalid RLC mode: {}, mode={}\n", qos.five_qi, qos.rlc.mode);
983 }
984 if (mode == rlc_mode::um_bidir || mode == rlc_mode::um_unidir_ul || mode == rlc_mode::um_unidir_dl) {
985 out_pdcp.rlc_mode = pdcp_rlc_mode::um;
986 } else if (mode == rlc_mode::am) {
987 out_pdcp.rlc_mode = pdcp_rlc_mode::am;
988 } else {
989 report_error("Invalid RLC mode: {}, mode={}\n", qos.five_qi, qos.rlc.mode);
990 }
991
992 // Integrity Protection required
993 out_pdcp.integrity_protection_required = qos.pdcp.integrity_protection_required;
994
995 // Ciphering required
996 out_pdcp.ciphering_required = true;
997
998 // > Tx
999 // >> SN size
1000 if (!pdcp_sn_size_from_uint(out_pdcp.tx.sn_size, qos.pdcp.tx.sn_field_length)) {
1001 report_error("Invalid PDCP TX SN: {}, SN={}\n", qos.five_qi, qos.pdcp.tx.sn_field_length);
1002 }
1003
1004 // >> discard timer
1005 out_pdcp.tx.discard_timer = pdcp_discard_timer{};
1006 if (!pdcp_discard_timer_from_int(out_pdcp.tx.discard_timer.value(), qos.pdcp.tx.discard_timer)) {
1007 report_error("Invalid PDCP discard timer. 5QI {} discard_timer {}\n", qos.five_qi, qos.pdcp.tx.discard_timer);
1008 }
1009
1010 // >> status report required
1011 out_pdcp.tx.status_report_required = qos.pdcp.tx.status_report_required;
1012
1013 // > Rx
1014 // >> SN size
1015 if (!pdcp_sn_size_from_uint(out_pdcp.rx.sn_size, qos.pdcp.rx.sn_field_length)) {
1016 report_error("Invalid PDCP RX SN: {}, SN={}\n", qos.five_qi, qos.pdcp.rx.sn_field_length);
1017 }
1018
1019 // >> out of order delivery
1020 out_pdcp.rx.out_of_order_delivery = qos.pdcp.rx.out_of_order_delivery;
1021
1022 // >> t-Reordering
1023 if (!pdcp_t_reordering_from_int(out_pdcp.rx.t_reordering, qos.pdcp.rx.t_reordering)) {
1024 report_error("Invalid PDCP t-Reordering. {} t-Reordering {}\n", qos.five_qi, qos.pdcp.rx.t_reordering);
1025 }
1026 }
1027 return out_cfg;
1028}
bool pdcp_t_reordering_from_int(pdcp_t_reordering &t_reord, int num)
Conversion of t-Reordering from integer to enum.
Definition pdcp_t_reordering.h:73
std::vector< qos_appconfig > qos_cfg
QoS configuration.
Definition gnb_appconfig.h:1244
Configurable parameters for PDCP.
Definition pdcp_config.h:209
QoS configuration.
Definition gnb_appconfig.h:632

◆ generate_cu_up_config()

srs_cu_up::cu_up_configuration srsran::generate_cu_up_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a CU-UP configuration.

273{
275 out_cfg.statistics_report_period = std::chrono::seconds{config.metrics_cfg.cu_up_statistics_report_period};
276 out_cfg.n3_cfg.gtpu_reordering_timer = std::chrono::milliseconds{config.cu_up_cfg.gtpu_reordering_timer_ms};
277 out_cfg.n3_cfg.warn_on_drop = config.cu_up_cfg.warn_on_drop;
278
279 if (config.amf_cfg.n3_bind_addr == "auto") {
280 out_cfg.net_cfg.n3_bind_addr = config.amf_cfg.bind_addr;
281 } else {
282 out_cfg.net_cfg.n3_bind_addr = config.amf_cfg.n3_bind_addr;
283 }
284 out_cfg.net_cfg.n3_rx_max_mmsg = config.amf_cfg.udp_rx_max_msgs;
285 out_cfg.net_cfg.f1u_bind_addr = config.amf_cfg.bind_addr; // FIXME: check if this can be removed for co-located case
286 return out_cfg;
287}
amf_appconfig amf_cfg
AMF configuration.
Definition gnb_appconfig.h:1229
cu_up_appconfig cu_up_cfg
CU-CP configuration.
Definition gnb_appconfig.h:1233
Configuration passed to CU-UP.
Definition cu_up_configuration.h:72

◆ generate_cu_up_qos_config()

std::map< five_qi_t, srs_cu_up::cu_up_qos_config > srsran::generate_cu_up_qos_config ( const gnb_appconfig & config)

Converts and returns the given gnb application QoS configuration to a CU-UP configuration.

1031{
1032 std::map<five_qi_t, srs_cu_up::cu_up_qos_config> out_cfg = {};
1033 if (config.qos_cfg.empty()) {
1034 out_cfg = config_helpers::make_default_cu_up_qos_config_list(config.cu_up_cfg.warn_on_drop,
1035 timer_duration(config.metrics_cfg.pdcp.report_period));
1036 return out_cfg;
1037 }
1038
1039 // Generate a temporary DU QoS config to obtain custom config parameters from the RLC counterpart
1040 std::map<five_qi_t, du_qos_config> du_qos = generate_du_qos_config(config);
1041
1042 for (const qos_appconfig& qos : config.qos_cfg) {
1043 if (out_cfg.find(qos.five_qi) != out_cfg.end()) {
1044 report_error("Duplicate 5QI configuration: {}\n", qos.five_qi);
1045 }
1046 if (du_qos.find(qos.five_qi) == du_qos.end()) {
1047 report_error("Cannot create CU-UP config: No entry for {} in DU QoS config\n", qos.five_qi);
1048 }
1049 // Convert PDCP custom config
1050 pdcp_custom_config& out_pdcp_custom = out_cfg[qos.five_qi].pdcp_custom;
1051 out_pdcp_custom.tx.warn_on_drop = config.cu_up_cfg.warn_on_drop;
1052 out_pdcp_custom.metrics_period = timer_duration(config.metrics_cfg.pdcp.report_period);
1053
1054 // Obtain RLC config parameters from the respective RLC mode
1055 const auto& du_five_qi = du_qos[qos.five_qi];
1056 if (du_five_qi.rlc.mode == rlc_mode::um_bidir) {
1057 // Take from UM config
1058 out_pdcp_custom.tx.rlc_sdu_queue = du_five_qi.rlc.um.tx.queue_size;
1059 } else if (du_five_qi.rlc.mode == rlc_mode::am) {
1060 // Take from AM config
1061 out_pdcp_custom.tx.rlc_sdu_queue = du_five_qi.rlc.am.tx.queue_size;
1062 } else {
1063 report_error("Cannot create CU-UP config: Unsupported rlc_mode={} for {} in DU QoS config\n.",
1064 du_five_qi.rlc.mode,
1065 qos.five_qi);
1066 }
1067 }
1068 return out_cfg;
1069}
std::map< five_qi_t, du_qos_config > generate_du_qos_config(const gnb_appconfig &config)
Converts and returns the given gnb application QoS configuration to a DU QoS list configuration.
Definition gnb_appconfig_translators.cpp:1111
std::chrono::milliseconds timer_duration
Unit used to represent a time duration in terms of timer_manager ticks.
Definition timers.h:40
Non-standard configurable parameters for PDCP.
Definition pdcp_config.h:172

◆ generate_du_cell_config()

std::vector< du_cell_config > srsran::generate_du_cell_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a DU cell configuration.

468{
469 srslog::basic_logger& logger = srslog::fetch_basic_logger("GNB", false);
470
471 std::vector<du_cell_config> out_cfg;
472 out_cfg.reserve(config.cells_cfg.size());
473
474 unsigned cell_id = 0;
475 for (const auto& cell : config.cells_cfg) {
477 const base_cell_appconfig& base_cell = cell.cell;
478 param.pci = base_cell.pci;
479 param.scs_common = base_cell.common_scs;
480 param.channel_bw_mhz = base_cell.channel_bw_mhz;
481 param.dl_arfcn = base_cell.dl_arfcn;
482 param.band = *base_cell.band;
483 // Enable CSI-RS if the PDSCH mcs is dynamic (min_ue_mcs != max_ue_mcs).
484 param.csi_rs_enabled = base_cell.csi_cfg.csi_rs_enabled;
485 param.nof_dl_ports = base_cell.nof_antennas_dl;
486 param.search_space0_index = base_cell.pdcch_cfg.common.ss0_index;
487 param.min_k1 = base_cell.pucch_cfg.min_k1;
488 param.min_k2 = base_cell.pusch_cfg.min_k2;
489 param.coreset0_index = base_cell.pdcch_cfg.common.coreset0_index;
490 // Set maximum CORESET#0 duration to 1 OFDM symbol for BW > 50Mhz to spread CORESET RBs across the BW. This results
491 // in one extra symbol to be used for PDSCH.
492 if (base_cell.pdcch_cfg.common.max_coreset0_duration.has_value()) {
493 param.max_coreset0_duration = base_cell.pdcch_cfg.common.max_coreset0_duration.value();
494 } else if (param.channel_bw_mhz > bs_channel_bandwidth_fr1::MHz50) {
495 param.max_coreset0_duration = 1;
496 }
497 const unsigned nof_crbs = band_helper::get_n_rbs_from_bw(
498 base_cell.channel_bw_mhz, param.scs_common, band_helper::get_freq_range(*param.band));
499
501 if (base_cell.pdcch_cfg.common.coreset0_index.has_value()) {
503 band_helper::get_ssb_coreset0_freq_location_for_cset0_idx(base_cell.dl_arfcn,
504 *param.band,
505 nof_crbs,
506 base_cell.common_scs,
507 base_cell.common_scs,
509 base_cell.pdcch_cfg.common.coreset0_index.value());
510 } else {
511 ssb_freq_loc = band_helper::get_ssb_coreset0_freq_location(base_cell.dl_arfcn,
512 *param.band,
513 nof_crbs,
514 base_cell.common_scs,
515 base_cell.common_scs,
518 }
519
520 if (!ssb_freq_loc.has_value()) {
521 report_error("Unable to derive a valid SSB pointA and k_SSB for cell id ({}).\n", base_cell.pci);
522 }
523
524 param.offset_to_point_a = (*ssb_freq_loc).offset_to_point_A;
525 param.k_ssb = (*ssb_freq_loc).k_ssb;
526 param.coreset0_index = (*ssb_freq_loc).coreset0_idx;
527
528 // Set TDD pattern.
529 if (band_helper::get_duplex_mode(*param.band) == duplex_mode::TDD) {
530 param.tdd_ul_dl_cfg_common.emplace(generate_tdd_pattern(param.scs_common, cell.cell.tdd_ul_dl_cfg.value()));
531 }
532
533 // Create the configuration.
534 out_cfg.push_back(config_helpers::make_default_du_cell_config(param));
536
537 // Set the rest of the parameters.
538 out_cell.nr_cgi.plmn = base_cell.plmn;
539 out_cell.nr_cgi.nci = config_helpers::make_nr_cell_identity(config.gnb_id, config.gnb_id_bit_length, cell_id);
540 out_cell.tac = base_cell.tac;
541 out_cell.searchspace0_idx = param.search_space0_index;
542
543 // Cell selection parameters.
544 out_cell.cell_sel_info.q_rx_lev_min = base_cell.q_rx_lev_min;
545 out_cell.cell_sel_info.q_qual_min = base_cell.q_qual_min;
546
547 // SSB config.
548 out_cell.ssb_cfg.ssb_period = (ssb_periodicity)base_cell.ssb_cfg.ssb_period_msec;
549 out_cell.ssb_cfg.ssb_block_power = base_cell.ssb_cfg.ssb_block_power;
550 out_cell.ssb_cfg.pss_to_sss_epre = base_cell.ssb_cfg.pss_to_sss_epre;
551
552 // SI message config.
553 if (not base_cell.sib_cfg.si_sched_info.empty()) {
554 out_cell.si_config.emplace();
555 out_cell.si_config->si_window_len_slots = base_cell.sib_cfg.si_window_len_slots;
556 out_cell.si_config->si_sched_info.resize(base_cell.sib_cfg.si_sched_info.size());
557 std::vector<uint8_t> sibs_included;
558 for (unsigned i = 0; i != base_cell.sib_cfg.si_sched_info.size(); ++i) {
559 auto& out_si = out_cell.si_config->si_sched_info[i];
560 out_si.si_period_radio_frames = base_cell.sib_cfg.si_sched_info[i].si_period_rf;
561 out_si.sib_mapping_info.resize(base_cell.sib_cfg.si_sched_info[i].sib_mapping_info.size());
562 for (unsigned j = 0; j != base_cell.sib_cfg.si_sched_info[i].sib_mapping_info.size(); ++j) {
563 sibs_included.push_back(base_cell.sib_cfg.si_sched_info[i].sib_mapping_info[j]);
564 out_si.sib_mapping_info[j] = static_cast<sib_type>(sibs_included.back());
565 }
566 }
567 for (const uint8_t sib_id : sibs_included) {
568 sib_info item;
569 switch (sib_id) {
570 case 2: {
571 item = create_sib2_info(config);
572 } break;
573 case 19: {
574 if (config.ntn_cfg.has_value()) {
575 item = create_sib19_info(config);
576 } else {
577 report_error("SIB19 is not configured, NTN fields required\n");
578 }
579 } break;
580 default:
581 report_error("SIB{} not supported\n", sib_id);
582 }
583 out_cell.si_config->sibs.push_back(item);
584 }
585 // Enable otherSI search space.
586 out_cell.dl_cfg_common.init_dl_bwp.pdcch_common.other_si_search_space_id = to_search_space_id(1);
587 }
588
589 // UE timers and constants config.
590 out_cell.ue_timers_and_constants.t300 = std::chrono::milliseconds(base_cell.sib_cfg.ue_timers_and_constants.t300);
591 out_cell.ue_timers_and_constants.t301 = std::chrono::milliseconds(base_cell.sib_cfg.ue_timers_and_constants.t301);
592 out_cell.ue_timers_and_constants.t310 = std::chrono::milliseconds(base_cell.sib_cfg.ue_timers_and_constants.t310);
593 out_cell.ue_timers_and_constants.n310 = base_cell.sib_cfg.ue_timers_and_constants.n310;
594 out_cell.ue_timers_and_constants.t311 = std::chrono::milliseconds(base_cell.sib_cfg.ue_timers_and_constants.t311);
595 out_cell.ue_timers_and_constants.n311 = base_cell.sib_cfg.ue_timers_and_constants.n311;
596 out_cell.ue_timers_and_constants.t319 = std::chrono::milliseconds(base_cell.sib_cfg.ue_timers_and_constants.t319);
597
598 // Carrier config.
599 out_cell.dl_carrier.nof_ant = base_cell.nof_antennas_dl;
600 out_cell.ul_carrier.nof_ant = base_cell.nof_antennas_ul;
601
602 // UL common config.
603 if (base_cell.ul_common_cfg.p_max.has_value()) {
604 out_cell.ul_cfg_common.freq_info_ul.p_max = base_cell.ul_common_cfg.p_max.value();
605 }
606
607 // DL common config.
608 out_cell.dl_cfg_common.freq_info_dl.scs_carrier_list.back().tx_direct_current_location = dc_offset_helper::pack(
609 base_cell.pdsch_cfg.dc_offset, out_cell.dl_cfg_common.freq_info_dl.scs_carrier_list.back().carrier_bandwidth);
610
611 // PRACH config.
612 rach_config_common& rach_cfg = *out_cell.ul_cfg_common.init_ul_bwp.rach_cfg_common;
613 rach_cfg.rach_cfg_generic.prach_config_index = base_cell.prach_cfg.prach_config_index.value();
614 rach_cfg.rach_cfg_generic.preamble_trans_max = base_cell.prach_cfg.preamble_trans_max;
615 rach_cfg.rach_cfg_generic.power_ramping_step_db = base_cell.prach_cfg.power_ramping_step_db;
616 const bool is_long_prach =
617 is_long_preamble(prach_configuration_get(band_helper::get_freq_range(param.band.value()),
618 band_helper::get_duplex_mode(param.band.value()),
619 rach_cfg.rach_cfg_generic.prach_config_index)
620 .format);
621 // \c is_prach_root_seq_index_l839 and msg1_scs are derived parameters, that depend on the PRACH format. They are
622 // originally computed in the base_cell struct, but since we overwrite the PRACH prach_config_index (which
623 // determines the PRACH format), we need to recompute both \c is_prach_root_seq_index_l839 and \c msg1_scs.
624 rach_cfg.is_prach_root_seq_index_l839 = is_long_prach;
625 rach_cfg.msg1_scs = is_long_prach ? subcarrier_spacing::invalid : base_cell.common_scs;
626 rach_cfg.prach_root_seq_index = base_cell.prach_cfg.prach_root_sequence_index;
627 rach_cfg.rach_cfg_generic.zero_correlation_zone_config = base_cell.prach_cfg.zero_correlation_zone;
628 rach_cfg.rach_cfg_generic.preamble_rx_target_pw = base_cell.prach_cfg.preamble_rx_target_pw;
629 // \c msg1_frequency_start for RACH is one of the parameters that can either be set manually, or need to be
630 // recomputed at the end of the manual configuration, as a results of other user parameters passed by the user.
631 bool update_msg1_frequency_start = not base_cell.prach_cfg.prach_frequency_start.has_value();
633 // Set manually.
634 rach_cfg.rach_cfg_generic.msg1_frequency_start = base_cell.prach_cfg.prach_frequency_start.value();
635 }
636 rach_cfg.total_nof_ra_preambles = base_cell.prach_cfg.total_nof_ra_preambles;
637 rach_cfg.nof_ssb_per_ro = base_cell.prach_cfg.nof_ssb_per_ro;
638 rach_cfg.nof_cb_preambles_per_ssb = base_cell.prach_cfg.nof_cb_preambles_per_ssb;
639
640 // PhysicalCellGroup Config parameters.
641 if (base_cell.pcg_cfg.p_nr_fr1.has_value()) {
642 out_cell.pcg_params.p_nr_fr1 = base_cell.pcg_cfg.p_nr_fr1.value();
643 }
644
645 // MAC Cell Group Config parameters.
646 out_cell.mcg_params.periodic_timer = to_periodic_bsr_timer(base_cell.mcg_cfg.bsr_cfg.periodic_bsr_timer);
647 out_cell.mcg_params.retx_timer = to_retx_bsr_timer(base_cell.mcg_cfg.bsr_cfg.retx_bsr_timer);
648 if (base_cell.mcg_cfg.bsr_cfg.lc_sr_delay_timer.has_value()) {
649 out_cell.mcg_params.lc_sr_delay_timer = to_lc_sr_delay_timer(base_cell.mcg_cfg.bsr_cfg.lc_sr_delay_timer.value());
650 }
651 out_cell.mcg_params.max_tx = to_sr_max_tx(base_cell.mcg_cfg.sr_cfg.sr_trans_max);
652 out_cell.mcg_params.phr_prohib_timer = to_phr_prohibit_timer(base_cell.mcg_cfg.phr_cfg.phr_prohib_timer);
653 if (base_cell.mcg_cfg.sr_cfg.sr_prohibit_timer.has_value()) {
654 out_cell.mcg_params.sr_prohibit_timer.emplace(
655 to_sr_prohib_timer(base_cell.mcg_cfg.sr_cfg.sr_prohibit_timer.value()));
656 }
657
658 // PCCH-Config.
659 out_cell.dl_cfg_common.init_dl_bwp.pdcch_common.paging_search_space_id =
660 to_search_space_id(base_cell.paging_cfg.paging_search_space_id);
661 out_cell.dl_cfg_common.pcch_cfg = generate_pcch_config(base_cell);
662
663 // Parameters for PUSCH-ConfigCommon.
664 if (not out_cell.ul_cfg_common.init_ul_bwp.pusch_cfg_common.has_value()) {
665 out_cell.ul_cfg_common.init_ul_bwp.pusch_cfg_common.emplace();
666 }
667 out_cell.ul_cfg_common.init_ul_bwp.pusch_cfg_common.value().msg3_delta_preamble =
668 base_cell.pusch_cfg.msg3_delta_preamble;
669 out_cell.ul_cfg_common.init_ul_bwp.pusch_cfg_common.value().p0_nominal_with_grant =
670 base_cell.pusch_cfg.p0_nominal_with_grant;
671 out_cell.ul_cfg_common.init_ul_bwp.pusch_cfg_common.value().msg3_delta_power = base_cell.pusch_cfg.msg3_delta_power;
672
673 if (config.ntn_cfg.has_value()) {
674 out_cell.ntn_cs_koffset = config.ntn_cfg.value().cell_specific_koffset;
675 }
676 // Parameters for PUCCH-ConfigCommon.
677 if (not out_cell.ul_cfg_common.init_ul_bwp.pucch_cfg_common.has_value()) {
678 out_cell.ul_cfg_common.init_ul_bwp.pucch_cfg_common.emplace();
679 }
680 out_cell.ul_cfg_common.init_ul_bwp.pucch_cfg_common.value().p0_nominal = base_cell.pucch_cfg.p0_nominal;
681
682 // Common PDCCH config.
683 search_space_configuration& ss1_cfg = out_cell.dl_cfg_common.init_dl_bwp.pdcch_common.search_spaces.back();
684 ss1_cfg.set_non_ss0_nof_candidates(base_cell.pdcch_cfg.common.ss1_n_candidates);
685
686 // UE-dedicated PDCCH config.
687 freq_resource_bitmap freq_resources(pdcch_constants::MAX_NOF_FREQ_RESOURCES);
688 unsigned cset1_start_crb = 0;
689 if (base_cell.pdcch_cfg.dedicated.coreset1_rb_start.has_value()) {
690 cset1_start_crb = base_cell.pdcch_cfg.dedicated.coreset1_rb_start.value();
691 }
693 if (base_cell.pdcch_cfg.dedicated.coreset1_l_crb.has_value()) {
694 cset1_l_crb = base_cell.pdcch_cfg.dedicated.coreset1_l_crb.value();
695 }
696 const unsigned coreset1_nof_resources = cset1_l_crb / pdcch_constants::NOF_RB_PER_FREQ_RESOURCE;
697 freq_resources.fill(cset1_start_crb / pdcch_constants::NOF_RB_PER_FREQ_RESOURCE,
698 cset1_start_crb / pdcch_constants::NOF_RB_PER_FREQ_RESOURCE + coreset1_nof_resources,
699 true);
700
701 search_space_configuration& ss2_cfg = out_cell.ue_ded_serv_cell_cfg.init_dl_bwp.pdcch_cfg->search_spaces[0];
702 coreset_configuration& cset1_cfg = out_cell.ue_ded_serv_cell_cfg.init_dl_bwp.pdcch_cfg->coresets[0];
703 cset1_cfg.set_freq_domain_resources(freq_resources);
704 if (base_cell.pdcch_cfg.dedicated.coreset1_duration.has_value()) {
705 cset1_cfg.duration = base_cell.pdcch_cfg.dedicated.coreset1_duration.value();
706 } else {
707 cset1_cfg.duration = out_cell.dl_cfg_common.init_dl_bwp.pdcch_common.coreset0->duration;
708 }
709 const std::array<uint8_t, 5> auto_compute_ss2_n_candidates_cfg = {0, 0, 0, 0, 0};
710 if (base_cell.pdcch_cfg.dedicated.ss2_n_candidates != auto_compute_ss2_n_candidates_cfg) {
711 ss2_cfg.set_non_ss0_nof_candidates(base_cell.pdcch_cfg.dedicated.ss2_n_candidates);
712 } else if (base_cell.pdcch_cfg.dedicated.ss2_type != search_space_configuration::type_t::common) {
713 ss2_cfg.set_non_ss0_nof_candidates({0,
714 config_helpers::compute_max_nof_candidates(aggregation_level::n2, cset1_cfg),
715 config_helpers::compute_max_nof_candidates(aggregation_level::n4, cset1_cfg),
716 0,
717 0});
718 }
719
720 if (base_cell.pdcch_cfg.dedicated.ss2_type == search_space_configuration::type_t::common) {
721 ss2_cfg.set_non_ss0_monitored_dci_formats(search_space_configuration::common_dci_format{.f0_0_and_f1_0 = true});
722 // TODO: Handle this implementation defined restriction of max. 4 PDCCH candidates in validator.
723 if (base_cell.pdcch_cfg.dedicated.ss2_n_candidates == auto_compute_ss2_n_candidates_cfg) {
724 ss2_cfg.set_non_ss0_nof_candidates(
725 {0,
726 std::min(static_cast<uint8_t>(4U),
727 config_helpers::compute_max_nof_candidates(aggregation_level::n2, cset1_cfg)),
728 std::min(static_cast<uint8_t>(4U),
729 config_helpers::compute_max_nof_candidates(aggregation_level::n4, cset1_cfg)),
730 0,
731 0});
732 }
733 } else if (not base_cell.pdcch_cfg.dedicated.dci_format_0_1_and_1_1) {
734 search_space_configuration& ss_cfg = out_cell.ue_ded_serv_cell_cfg.init_dl_bwp.pdcch_cfg->search_spaces[0];
735 ss_cfg.set_non_ss0_monitored_dci_formats(search_space_configuration::ue_specific_dci_format::f0_0_and_f1_0);
736 }
737
738 // PDSCH-Config - Update PDSCH time domain resource allocations based on partial slot and/or dedicated PDCCH
739 // configuration.
740 out_cell.dl_cfg_common.init_dl_bwp.pdsch_common.pdsch_td_alloc_list =
741 config_helpers::make_pdsch_time_domain_resource(
743 out_cell.dl_cfg_common.init_dl_bwp.pdcch_common,
744 out_cell.ue_ded_serv_cell_cfg.init_dl_bwp.pdcch_cfg,
745 band_helper::get_duplex_mode(param.band.value()) == duplex_mode::TDD ? out_cell.tdd_ul_dl_cfg_common.value()
747
748 out_cell.ue_ded_serv_cell_cfg.pdsch_serv_cell_cfg->nof_harq_proc =
749 (pdsch_serving_cell_config::nof_harq_proc_for_pdsch)config.cells_cfg.front().cell.pdsch_cfg.nof_harqs;
750 // Set DL MCS table.
751 out_cell.ue_ded_serv_cell_cfg.init_dl_bwp.pdsch_cfg->mcs_table = base_cell.pdsch_cfg.mcs_table;
752 // Set DMRS additional position.
753 out_cell.ue_ded_serv_cell_cfg.init_dl_bwp.pdsch_cfg->pdsch_mapping_type_a_dmrs->additional_positions =
754 uint_to_dmrs_additional_positions(base_cell.pdsch_cfg.dmrs_add_pos);
755
756 // Parameters for csiMeasConfig.
757 if (param.csi_rs_enabled) {
758 fill_csi_resources(out_cell.ue_ded_serv_cell_cfg, base_cell);
759 }
760
761 // Parameters for PUCCH-Config builder (these parameters will be used later on to generate the PUCCH resources).
763 const pucch_appconfig& user_pucch_cfg = base_cell.pucch_cfg;
764 du_pucch_cfg.nof_ue_pucch_f1_res_harq = user_pucch_cfg.nof_ue_pucch_f1_res_harq;
765 du_pucch_cfg.nof_ue_pucch_f2_res_harq = user_pucch_cfg.nof_ue_pucch_f2_res_harq;
766 du_pucch_cfg.nof_cell_harq_pucch_res_sets = user_pucch_cfg.nof_cell_harq_pucch_sets;
767 du_pucch_cfg.nof_sr_resources = user_pucch_cfg.nof_cell_sr_resources;
768 du_pucch_cfg.nof_csi_resources = user_pucch_cfg.nof_cell_csi_resources;
769 du_pucch_cfg.f1_params.nof_symbols = user_pucch_cfg.f1_nof_symbols;
770 du_pucch_cfg.f1_params.occ_supported = user_pucch_cfg.f1_enable_occ;
771 du_pucch_cfg.f1_params.nof_cyc_shifts = static_cast<nof_cyclic_shifts>(user_pucch_cfg.nof_cyclic_shift);
772 du_pucch_cfg.f1_params.intraslot_freq_hopping = user_pucch_cfg.f1_intraslot_freq_hopping;
773 du_pucch_cfg.f2_params.nof_symbols = user_pucch_cfg.f2_nof_symbols;
774 du_pucch_cfg.f2_params.max_code_rate = user_pucch_cfg.max_code_rate;
775 du_pucch_cfg.f2_params.max_nof_rbs = user_pucch_cfg.f2_max_nof_rbs;
776 du_pucch_cfg.f2_params.intraslot_freq_hopping = user_pucch_cfg.f2_intraslot_freq_hopping;
777 du_pucch_cfg.f2_params.max_payload_bits = user_pucch_cfg.max_payload_bits;
778
779 // Parameters for PUSCH-Config.
780 if (not out_cell.ue_ded_serv_cell_cfg.ul_config.has_value()) {
781 out_cell.ue_ded_serv_cell_cfg.ul_config.emplace();
782 }
783 if (not out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pusch_cfg.has_value()) {
784 out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pusch_cfg.emplace();
785 }
786 // Set DMRS additional position.
787 out_cell.ue_ded_serv_cell_cfg.ul_config.value()
788 .init_ul_bwp.pusch_cfg->pusch_mapping_type_a_dmrs->additional_positions =
789 uint_to_dmrs_additional_positions(base_cell.pusch_cfg.dmrs_add_pos);
790 // Set UL MCS table.
791 out_cell.ue_ded_serv_cell_cfg.ul_config->init_ul_bwp.pusch_cfg->mcs_table = base_cell.pusch_cfg.mcs_table;
792 if (not out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pusch_cfg.value().uci_cfg.has_value()) {
793 out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pusch_cfg.value().uci_cfg.emplace();
794 }
795 if (not out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pusch_cfg.value().uci_cfg.has_value()) {
796 out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pusch_cfg.value().uci_cfg.emplace();
797 }
798 if (not out_cell.ue_ded_serv_cell_cfg.ul_config.value()
799 .init_ul_bwp.pusch_cfg.value()
800 .uci_cfg.value()
801 .beta_offsets_cfg.has_value()) {
802 out_cell.ue_ded_serv_cell_cfg.ul_config.value()
803 .init_ul_bwp.pusch_cfg.value()
804 .uci_cfg.value()
805 .beta_offsets_cfg->emplace<uci_on_pusch::beta_offsets_semi_static>();
806 }
808 out_cell.ue_ded_serv_cell_cfg.ul_config.value()
809 .init_ul_bwp.pusch_cfg.value()
810 .uci_cfg.value()
811 .beta_offsets_cfg.value())) {
812 out_cell.ue_ded_serv_cell_cfg.ul_config.value()
813 .init_ul_bwp.pusch_cfg.value()
814 .uci_cfg.value()
815 .beta_offsets_cfg.reset();
816 out_cell.ue_ded_serv_cell_cfg.ul_config.value()
817 .init_ul_bwp.pusch_cfg.value()
818 .uci_cfg.value()
819 .beta_offsets_cfg->emplace<uci_on_pusch::beta_offsets_semi_static>();
820 }
822 variant_get<uci_on_pusch::beta_offsets_semi_static>(out_cell.ue_ded_serv_cell_cfg.ul_config.value()
823 .init_ul_bwp.pusch_cfg.value()
824 .uci_cfg.value()
825 .beta_offsets_cfg.value());
826 b_offsets.beta_offset_ack_idx_1 = base_cell.pusch_cfg.b_offset_ack_idx_1;
827 b_offsets.beta_offset_ack_idx_2 = base_cell.pusch_cfg.b_offset_ack_idx_2;
828 b_offsets.beta_offset_ack_idx_3 = base_cell.pusch_cfg.b_offset_ack_idx_3;
829 b_offsets.beta_offset_csi_p1_idx_1 = base_cell.pusch_cfg.b_offset_csi_p1_idx_1;
830 b_offsets.beta_offset_csi_p1_idx_2 = base_cell.pusch_cfg.b_offset_csi_p1_idx_2;
831 b_offsets.beta_offset_csi_p2_idx_1 = base_cell.pusch_cfg.b_offset_csi_p2_idx_1;
832 b_offsets.beta_offset_csi_p2_idx_2 = base_cell.pusch_cfg.b_offset_csi_p2_idx_2;
833
834 // Parameters for PUCCH-Config.
835 if (not out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pucch_cfg.has_value()) {
836 out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pucch_cfg.emplace();
837 }
838 auto& sr_cng = out_cell.ue_ded_serv_cell_cfg.ul_config.value().init_ul_bwp.pucch_cfg.value().sr_res_list;
839 if (sr_cng.empty()) {
841 }
842 sr_cng.front().period = static_cast<sr_periodicity>(get_nof_slots_per_subframe(base_cell.common_scs) *
843 base_cell.pucch_cfg.sr_period_msec);
844
845 // If any dependent parameter needs to be updated, this is the place.
846 config_helpers::compute_nof_sr_csi_pucch_res(
848 base_cell.ul_common_cfg.max_pucchs_per_slot,
849 base_cell.pucch_cfg.sr_period_msec,
850 base_cell.csi_cfg.csi_rs_enabled ? optional<unsigned>{base_cell.csi_cfg.csi_rs_period_msec} : nullopt);
852 rach_cfg.rach_cfg_generic.msg1_frequency_start = config_helpers::compute_prach_frequency_start(
853 du_pucch_cfg, out_cell.ul_cfg_common.init_ul_bwp.generic_params.crbs.length(), is_long_prach);
854 }
855
856 logger.info(
857 "SSB derived parameters for cell: {}, band: {}, dl_arfcn:{}, crbs: {} scs:{}, ssb_scs:{}:\n\t - SSB offset "
858 "pointA:{} \n\t - k_SSB:{} \n\t - SSB arfcn:{} \n\t - Coreset index:{} \n\t - Searchspace index:{}",
859 base_cell.pci,
860 *param.band,
861 base_cell.dl_arfcn,
862 nof_crbs,
863 to_string(base_cell.common_scs),
864 to_string(out_cfg.back().ssb_cfg.scs),
865 (*ssb_freq_loc).offset_to_point_A.to_uint(),
866 (*ssb_freq_loc).k_ssb.to_uint(),
867 (*ssb_freq_loc).ssb_arfcn,
868 (*ssb_freq_loc).coreset0_idx,
869 (*ssb_freq_loc).searchspace0_idx);
870
872 if (!error) {
873 report_error("Invalid configuration DU cell detected.\n> {}\n", error.error());
874 }
875 ++cell_id;
876 }
877
878 return out_cfg;
879}
Definition expected.h:51
sr_prohib_timer to_sr_prohib_timer(unsigned sr_prohibit_timer)
Return the enum value of sr-ProhibitTimer corresponding to the given unsigned value.
Definition sr_configuration.h:77
logical_channel_sr_delay_timer to_lc_sr_delay_timer(unsigned timer_value)
Return the enum value of logical_channel_sr_delay_timer corresponding to give value.
Definition bsr_format.h:182
phr_prohibit_timer to_phr_prohibit_timer(unsigned prohib_timer)
Return the enum value of phr-ProhibitTimer corresponding to the given unsigned value.
Definition phr_config.h:66
ssb_periodicity
SSB periodicity in milliseconds as per TS38.331 Section 6.3.2 IE ssb-periodicityServingCell.
Definition ssb_properties.h:33
prach_configuration prach_configuration_get(frequency_range fr, duplex_mode dm, uint8_t prach_config_index)
Gets a PRACH configuration.
Definition prach_configuration.cpp:555
sr_max_tx to_sr_max_tx(unsigned max_tx)
Return the enum value of sr-TransMax corresponding to the given unsigned value.
Definition sr_configuration.h:105
variant< sib2_info, sib19_info > sib_info
Variant type that can hold different types of SIBs that go in a SI message.
Definition system_info_config.h:188
periodic_bsr_timer to_periodic_bsr_timer(unsigned timer_value)
Return the enum value of periodic_bsr_timer corresponding to give value.
Definition bsr_format.h:72
constexpr bool is_long_preamble(prach_format_type type)
Checks if the preamble format is long.
Definition prach_format_type.h:106
retx_bsr_timer to_retx_bsr_timer(unsigned timer_value)
Return the enum value of retx_bsr_timer corresponding to give value.
Definition bsr_format.h:134
nof_cyclic_shifts
Options for the number of Initial Cyclic Shifts that can be set for PUCCH Format 1.
Definition du_cell_config.h:43
sr_periodicity
Definition sr_configuration.h:46
validator_result is_du_cell_config_valid(const du_cell_config &cell_cfg)
Checks whether the provided DU cell configuration is valid.
Definition du_cell_config_validation.cpp:557
BetaOffsets, as per TS 38.331. These values are mapped into floats as per Tables in Section 9....
Definition uci_configuration.h:55
Main cell parameters from which other cell parameters (e.g. coreset0, BWP RBs) will be derived.
Definition cell_config_builder_params.h:36
optional< tdd_ul_dl_config_common > tdd_ul_dl_cfg_common
Defines the TDD DL-UL pattern and periodicity. If no value is set, the cell is in FDD mode.
Definition cell_config_builder_params.h:73
pci_t pci
Physical Cell Identity.
Definition cell_config_builder_params.h:38
optional< nr_band > band
Definition cell_config_builder_params.h:47
unsigned nof_dl_ports
Number of DL ports for the cell.
Definition cell_config_builder_params.h:63
unsigned search_space0_index
This is searchSpaceZero, as per TS38.213, Section 13.
Definition cell_config_builder_params.h:56
uint8_t min_k1
Minimum k1 value used in the generation of the UE "dl-DataToUl-Ack", as per TS38.213,...
Definition cell_config_builder_params.h:66
optional< ssb_subcarrier_offset > k_ssb
k_ssb or SSB SubcarrierOffest, as per TS38.211 Section 7.4.3.1. Possible values: {0,...
Definition cell_config_builder_params.h:59
subcarrier_spacing scs_common
subCarrierSpacingCommon, as per MIB, TS 38.331.
Definition cell_config_builder_params.h:40
unsigned dl_arfcn
This ARFCN represents "f_ref" for DL, as per TS 38.211, Section 5.4.2.1.
Definition cell_config_builder_params.h:44
bs_channel_bandwidth_fr1 channel_bw_mhz
BS Channel Bandwidth, as per TS 38.104, Section 5.3.1.
Definition cell_config_builder_params.h:42
uint8_t max_coreset0_duration
Maximum CORESET#0 duration in OFDM symbols to consider when deriving CORESET#0 index.
Definition cell_config_builder_params.h:54
optional< ssb_offset_to_pointA > offset_to_point_a
Definition cell_config_builder_params.h:50
bool csi_rs_enabled
Whether to enable CSI-RS in the cell.
Definition cell_config_builder_params.h:61
uint8_t min_k2
Minimum k2 value used in the generation of the UE PUSCH time-domain resources. The value of min_k2 sh...
Definition cell_config_builder_params.h:71
optional< unsigned > coreset0_index
This is controlResourceSetZero, as per TS38.213, Section 13. If not specified, a valid coreset0 is de...
Definition cell_config_builder_params.h:52
Definition du_cell_config.h:117
optional< ntn_config > ntn_cfg
NTN configuration.
Definition gnb_appconfig.h:1259
uint8_t gnb_id_bit_length
Length of gNB identity in bits. Values {22,...,32}.
Definition gnb_appconfig.h:1225
nof_harq_proc_for_pdsch
nrofHARQ-ProcessesForPDSCH.
Definition serving_cell_config.h:227
prach_format_type format
Preamble format (see here for more information).
Definition prach_configuration.h:42
Definition gnb_appconfig.h:274
unsigned nof_ue_pucch_f1_res_harq
Definition gnb_appconfig.h:281
Parameters for PUCCH configuration. Defines the parameters that are used for the PUCCH configuration ...
Definition du_cell_config.h:76
Used to specify the cell-specific random-access parameters as per TS 38.331, "RACH-ConfigCommon".
Definition rach_config_common.h:56
uint8_t prach_config_index
Values: {0,...,255}.
Definition rach_config_common.h:35
SR Configuration, as per SchedulingRequestResourceConfig, TS 38.331.
Definition sr_configuration.h:138
SearchSpace Common Type DCI Formats.
Definition search_space.h:68
void set_non_ss0_nof_candidates(std::array< uint8_t, 5 > nof_candidates_)
Sets the nof. PDCCH candidates for non-SearchSpace#0 SearchSpaces.
Definition search_space.h:138
void set_non_ss0_monitored_dci_formats(variant< common_dci_format, ue_specific_dci_format > dci_fmt_)
Sets the DCI format(s) monitored in non-SearchSpace#0 SearchSpaces.
Definition search_space.h:148
Definition tdd_ul_dl_config.h:47

◆ generate_du_low_config()

std::vector< upper_phy_config > srsran::generate_du_low_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to an upper PHY configuration.

1561{
1562 std::vector<upper_phy_config> out_cfg;
1563 out_cfg.reserve(config.cells_cfg.size());
1564
1565 for (unsigned i = 0, e = config.cells_cfg.size(); i != e; ++i) {
1566 const base_cell_appconfig& cell = config.cells_cfg[i].cell;
1567 upper_phy_config cfg;
1568
1569 // Get bandwidth in PRB.
1570 const unsigned bw_rb = band_helper::get_n_rbs_from_bw(cell.channel_bw_mhz, cell.common_scs, frequency_range::FR1);
1571 // Build the biggest CORESET possible assuming a duration of 2 symbols and the maximum channel bandwidth.
1572 coreset_configuration coreset;
1573 coreset.id = to_coreset_id(1);
1574 coreset.duration = 2;
1575 coreset.set_freq_domain_resources(~freq_resource_bitmap(bw_rb / pdcch_constants::NOF_RB_PER_FREQ_RESOURCE));
1576
1577 // Calculate the maximum number of users per slot. Pick the minimum of CCE assuming the CORESET above and the
1578 // maximum of PDU per slot.
1579 const unsigned max_nof_users_slot = std::min(coreset.get_nof_cces(), static_cast<unsigned>(MAX_UE_PDUS_PER_SLOT));
1580 // Assume a maximum of 16 HARQ processes for PUSCH and PDSCH.
1581 const unsigned max_harq_process = MAX_NOF_HARQS;
1582 // Deduce the number of slots per subframe.
1583 const unsigned nof_slots_per_subframe = get_nof_slots_per_subframe(cell.common_scs);
1584 // Deduce the number of slots per frame.
1585 unsigned nof_slots_per_frame = nof_slots_per_subframe * NOF_SUBFRAMES_PER_FRAME;
1586 // Number of slots per system frame.
1587 unsigned nof_slots_per_system_frame = NOF_SFNS * nof_slots_per_frame;
1588 // Assume the PUSCH HARQ softbuffer expiration time is 100ms.
1589 const unsigned expire_pusch_harq_timeout_slots = 100 * nof_slots_per_subframe;
1590 // Assume the maximum number of active PUSCH and PDSCH HARQ processes is twice the maximum number of users per slot
1591 // for the maximum number of HARQ processes.
1592 const unsigned nof_buffers = 2 * max_nof_users_slot * max_harq_process;
1593 // Deduce the maximum number of codeblocks that can be scheduled for PUSCH in one slot.
1594 const unsigned max_nof_pusch_cb_slot =
1595 (pusch_constants::MAX_NRE_PER_RB * bw_rb * get_bits_per_symbol(modulation_scheme::QAM256)) /
1596 ldpc::MAX_MESSAGE_SIZE;
1597 // Assume the minimum number of codeblocks per softbuffer.
1598 const unsigned min_cb_softbuffer = 2;
1599 // Assume that the maximum number of receive codeblocks is equal to the number of HARQ processes times the maximum
1600 // number of codeblocks per slot.
1601 const unsigned max_rx_nof_codeblocks =
1602 std::max(max_harq_process * max_nof_pusch_cb_slot, min_cb_softbuffer * nof_buffers);
1603
1604 // Determine processing pipelines depth. Make sure the number of slots per system frame is divisible by the pipeline
1605 // depths.
1607 while (nof_slots_per_system_frame % dl_pipeline_depth != 0) {
1609 }
1611
1612 static constexpr unsigned prach_pipeline_depth = 1;
1613
1614 // Get band, frequency range and duplex mode from the band.
1615 nr_band band = cell.band.value();
1616 const frequency_range freq_range = band_helper::get_freq_range(band);
1617 const duplex_mode duplex = band_helper::get_duplex_mode(band);
1618
1619 const prach_configuration prach_cfg =
1621 srsran_assert(prach_cfg.format != prach_format_type::invalid,
1622 "Unsupported PRACH configuration index (i.e., {}) for the given frequency range (i.e., {}) and "
1623 "duplex mode (i.e., {}).",
1624 cell.prach_cfg.prach_config_index.value(),
1626 to_string(duplex));
1627
1628 // Maximum number of HARQ processes for a PUSCH HARQ process.
1629 static constexpr unsigned max_nof_pusch_harq = 16;
1630
1631 // Maximum concurrent PUSCH processing. If there are no dedicated threads for PUSCH decoding, set the maximum
1632 // concurrency to one. Otherwise, assume every possible PUSCH transmission for the maximum number of HARQ could be
1633 // enqueued.
1634 unsigned max_pusch_concurrency = cell.pusch_cfg.max_puschs_per_slot * max_nof_pusch_harq;
1636 max_pusch_concurrency = 1;
1637 }
1638
1640 cfg.log_level = srslog::str_to_basic_level(config.log_cfg.phy_level);
1646 cfg.sector_id = i;
1647 cfg.nof_tx_ports = cell.nof_antennas_dl;
1648 cfg.nof_rx_ports = cell.nof_antennas_ul;
1651 cfg.nof_dl_rg = dl_pipeline_depth + 2;
1656 cfg.max_pusch_concurrency = max_pusch_concurrency;
1659 cfg.nof_prach_buffer = prach_pipeline_depth * nof_slots_per_subframe;
1665
1666 cfg.active_scs = {};
1667 cfg.active_scs[to_numerology_value(config.cells_cfg.front().cell.common_scs)] = true;
1668
1669 cfg.dl_bw_rb = bw_rb;
1670 cfg.ul_bw_rb = bw_rb;
1671
1672 cfg.rx_buffer_config.nof_buffers = nof_buffers;
1674 cfg.rx_buffer_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE;
1677
1678 if (!is_valid_upper_phy_config(cfg)) {
1679 report_error("Invalid upper PHY configuration.\n");
1680 }
1681
1682 out_cfg.push_back(cfg);
1683 }
1684
1685 return out_cfg;
1686}
static sinr_type sinr_type_from_string(const std::string &sinr_type_str)
Gets a SINR type from a string representation.
Definition channel_state_information.h:61
constexpr size_t NOF_SFNS
Number of system Frame Number values.
Definition slot_point.h:35
duplex_mode
NR Duplex mode.
Definition duplex_mode.h:30
bool is_valid_upper_phy_config(const upper_phy_config &config)
Returns true if the given upper PHY configuration is valid, otherwise false.
Definition upper_phy_factories.h:322
nr_band
NR operating bands in FR1 and FR2.
Definition nr_band.h:32
bounded_bitset< pdcch_constants::MAX_NOF_FREQ_RESOURCES, true > freq_resource_bitmap
Definition coreset.h:38
frequency_range
Labels for the frequency ranges described in TS38.104 Table 5.1-1.
Definition frequency_range.h:30
constexpr uint32_t NOF_SUBFRAMES_PER_FRAME
Number of subframers per frame. This constant doesn't depend on the numerology used.
Definition slot_point.h:32
subcarrier_spacing common_scs
Common subcarrier spacing for the entire resource grid. It must be supported by the band SS raster.
Definition gnb_appconfig.h:513
optional< nr_band > band
NR band.
Definition gnb_appconfig.h:477
pusch_appconfig pusch_cfg
PUSCH configuration.
Definition gnb_appconfig.h:505
unsigned nof_antennas_dl
Number of antennas in downlink.
Definition gnb_appconfig.h:481
bs_channel_bandwidth_fr1 channel_bw_mhz
Channel bandwidth in MHz.
Definition gnb_appconfig.h:479
unsigned nof_antennas_ul
Number of antennas in uplink.
Definition gnb_appconfig.h:483
prach_appconfig prach_cfg
PRACH configuration.
Definition gnb_appconfig.h:503
unsigned duration
Duration in number of symbols. Values: (1..maxCORESETDuration).
Definition coreset.h:71
unsigned get_nof_cces() const
Definition coreset.h:113
expert_threads_appconfig threads
Expert thread configuration of the gNB app.
Definition gnb_appconfig.h:1203
upper_phy_threads_appconfig upper_threads
Upper PHY thread configuration of the gNB app.
Definition gnb_appconfig.h:1191
unsigned nof_slots_request_headroom
Request headroom size in slots.
Definition gnb_appconfig.h:870
unsigned max_processing_delay_slots
Sets the maximum allowed downlink processing delay in slots.
Definition gnb_appconfig.h:854
unsigned pusch_decoder_max_iterations
Number of PUSCH LDPC decoder iterations.
Definition gnb_appconfig.h:856
std::string pusch_sinr_calc_method
Selects a PUSCH SINR calculation method.
Definition gnb_appconfig.h:865
bool pusch_decoder_early_stop
Set to true to enable the PUSCH LDPC decoder early stop.
Definition gnb_appconfig.h:858
log_appconfig log_cfg
Logging configuration.
Definition gnb_appconfig.h:1217
expert_execution_appconfig expert_execution_cfg
Expert configuration.
Definition gnb_appconfig.h:1265
expert_upper_phy_appconfig expert_phy_cfg
Expert physical layer configuration.
Definition gnb_appconfig.h:1253
int hex_max_size
Maximum number of bytes to write when dumping hex arrays.
Definition gnb_appconfig.h:770
bool broadcast_enabled
Set to true to log broadcasting messages and all PRACH opportunities.
Definition gnb_appconfig.h:772
std::string phy_rx_symbols_filename
Set to a valid file path to print the received symbols.
Definition gnb_appconfig.h:774
optional< unsigned > phy_rx_symbols_port
Set to a valid Rx port number or empty for all ports.
Definition gnb_appconfig.h:776
bool phy_rx_symbols_prach
If true, prints the PRACH frequency-domain symbols.
Definition gnb_appconfig.h:778
optional< unsigned > prach_config_index
PRACH configuration index. If not specified, it is automatically derived to fit in an UL slot.
Definition gnb_appconfig.h:59
Contains the PRACH configuration parameters.
Definition prach_configuration.h:40
uint8_t nof_occasions_within_slot
Number of time-domain PRACH occasions within a PRACH slot. Set zero for reserved.
Definition prach_configuration.h:54
unsigned max_puschs_per_slot
Maximum number of PUSCH grants per slot.
Definition gnb_appconfig.h:257
unsigned nof_codeblocks
Number of codeblocks available in the pool for all the buffers.
Definition rx_buffer_pool.h:98
unsigned max_codeblock_size
Maximum codeblock size.
Definition rx_buffer_pool.h:94
unsigned expire_timeout_slots
buffer lifetime as a number of slots.
Definition rx_buffer_pool.h:100
unsigned nof_buffers
Number of buffers available in the pool.
Definition rx_buffer_pool.h:96
bool external_soft_bits
Set to true to indicate that soft bits are not stored in the buffer.
Definition rx_buffer_pool.h:102
unsigned nof_prach_buffer
Number of PRACH buffer.
Definition upper_phy_factories.h:280
std::string rx_symbol_printer_filename
Receive symbol printer. Leave empty to disable.
Definition upper_phy_factories.h:232
unsigned nof_dl_processors
Maximum number of concurrent downlink processes.
Definition upper_phy_factories.h:288
unsigned max_nof_fd_prach_occasions
Maximum number of frequency-domain occasions.
Definition upper_phy_factories.h:284
unsigned max_pusch_concurrency
Maximum asynchronous PUSCH processing concurrency for each UL processor.
Definition upper_phy_factories.h:292
unsigned logger_max_hex_size
Logger maximum hexadecimal dump size. Set to zero for none.
Definition upper_phy_factories.h:228
unsigned nof_tx_ports
Number of transmit antenna ports.
Definition upper_phy_factories.h:269
bool ldpc_decoder_early_stop
Set to true to enable the LDPC decoder early stop.
Definition upper_phy_factories.h:265
bool is_prach_long_format
Set to true if the PRACH preamble is long.
Definition upper_phy_factories.h:286
unsigned max_nof_td_prach_occasions
Maximum number of time-domain occasions.
Definition upper_phy_factories.h:282
channel_state_information::sinr_type pusch_sinr_calc_method
Selects the PUSCH SINR calculation method used for choosing the modulation and coding scheme.
Definition upper_phy_factories.h:230
unsigned dl_rg_expire_timeout_slots
Downlink resource grid timeout expiration in number of slots.
Definition upper_phy_factories.h:276
unsigned nof_ul_rg
Number of uplink resource grids. They are reused after nof_ul_rg slots.
Definition upper_phy_factories.h:278
unsigned nof_dl_rg
Definition upper_phy_factories.h:274
rx_buffer_pool_config rx_buffer_config
Receive buffer pool configuration.
Definition upper_phy_factories.h:304
bool rx_symbol_printer_prach
Boolean flag for dumping PRACH symbols when set to true.
Definition upper_phy_factories.h:236
unsigned nof_rx_ports
Number of receive antenna ports.
Definition upper_phy_factories.h:271
unsigned nof_slots_request_headroom
Request headroom size in slots.
Definition upper_phy_factories.h:300
optional< unsigned > rx_symbol_printer_port
Receive port the UL symbols are dumped from. Leave emtpy for all ports.
Definition upper_phy_factories.h:234
unsigned dl_bw_rb
Number of RBs for downlink.
Definition upper_phy_factories.h:296
std::array< bool, to_numerology_value(subcarrier_spacing::invalid)> active_scs
List of active subcarrier spacing, indexed by numerology.
Definition upper_phy_factories.h:302
unsigned ldpc_decoder_iterations
Number of LDPC decoder iterations.
Definition upper_phy_factories.h:263
unsigned nof_pusch_decoder_threads
Number of threads that simultaneously use a PUSCH decoder.
Definition upper_phy_factories.h:294
unsigned ul_bw_rb
Number of RBs for uplink.
Definition upper_phy_factories.h:298
unsigned sector_id
Radio sector identifier.
Definition upper_phy_factories.h:267
bool enable_logging_broadcast
Enable logging broadcast channels such as SSB, PDSCH and PDCCH channels with broadcast RNTIs.
Definition upper_phy_factories.h:226
unsigned max_ul_thread_concurrency
Maximum uplink processor thread concurrency.
Definition upper_phy_factories.h:290
unsigned nof_pusch_decoder_threads
Number of threads for concurrent PUSCH decoding.
Definition gnb_appconfig.h:1135
unsigned nof_ul_threads
Number of threads for processing PUSCH and PUCCH.
Definition gnb_appconfig.h:1137

◆ generate_du_qos_config()

std::map< five_qi_t, du_qos_config > srsran::generate_du_qos_config ( const gnb_appconfig & config)

Converts and returns the given gnb application QoS configuration to a DU QoS list configuration.

1112{
1113 std::map<five_qi_t, du_qos_config> out_cfg = {};
1114 if (config.qos_cfg.empty()) {
1115 out_cfg = config_helpers::make_default_du_qos_config_list(config.metrics_cfg.rlc.report_period);
1116 return out_cfg;
1117 }
1118
1119 for (const qos_appconfig& qos : config.qos_cfg) {
1120 if (out_cfg.find(qos.five_qi) != out_cfg.end()) {
1121 report_error("Duplicate 5QI configuration: {}\n", qos.five_qi);
1122 }
1123 // Convert RLC config
1124 auto& out_rlc = out_cfg[qos.five_qi].rlc;
1125 if (!from_string(out_rlc.mode, qos.rlc.mode)) {
1126 report_error("Invalid RLC mode: {}, mode={}\n", qos.five_qi, qos.rlc.mode);
1127 }
1128
1129 if (out_rlc.mode == rlc_mode::um_bidir) {
1130 // UM Config
1131 //< RX SN
1132 if (!from_number(out_rlc.um.rx.sn_field_length, qos.rlc.um.rx.sn_field_length)) {
1133 report_error("Invalid RLC UM RX SN: {}, SN={}\n", qos.five_qi, qos.rlc.um.rx.sn_field_length);
1134 }
1135 //< RX t-reassembly
1136 out_rlc.um.rx.t_reassembly = qos.rlc.um.rx.t_reassembly;
1137 //< TX SN
1138 if (!from_number(out_rlc.um.tx.sn_field_length, qos.rlc.um.tx.sn_field_length)) {
1139 report_error("Invalid RLC UM TX SN: {}, SN={}\n", qos.five_qi, qos.rlc.um.tx.sn_field_length);
1140 }
1141 out_rlc.um.tx.queue_size = qos.rlc.um.tx.queue_size;
1142 } else if (out_rlc.mode == rlc_mode::am) {
1143 // AM Config
1144 out_rlc.am = generate_rlc_am_config(qos.rlc.am);
1145 }
1146 out_rlc.metrics_period = std::chrono::milliseconds(config.metrics_cfg.rlc.report_period);
1147
1148 // Convert F1-U config
1149 auto& out_f1u = out_cfg[qos.five_qi].f1u;
1150 //< t-Notify
1151 out_f1u.t_notify = qos.f1u_du.t_notify;
1152
1153 // Convert MAC config
1154 out_cfg[qos.five_qi].mac = generate_mac_lc_config(qos.mac);
1155 }
1156 return out_cfg;
1157}
srsran::mac_lc_config generate_mac_lc_config(const mac_lc_appconfig &in_cfg)
Converts and returns the given gnb MAC LC configuration to a MAC LC configuration.
Definition gnb_appconfig_translators.cpp:1097
srsran::rlc_am_config generate_rlc_am_config(const rlc_am_appconfig &in_cfg)
Converts and returns the given gnb RLC AM configuration to a RLC configuration.
Definition gnb_appconfig_translators.cpp:1071

◆ generate_du_srb_config()

std::map< srb_id_t, du_srb_config > srsran::generate_du_srb_config ( const gnb_appconfig & config)

Converts and returns the given gnb application QoS configuration to a DU SRB list configuration.

1160{
1161 std::map<srb_id_t, du_srb_config> srb_cfg;
1162
1163 // SRB1
1164 srb_cfg.insert(std::make_pair(srb_id_t::srb1, du_srb_config{}));
1165 if (config.srb_cfg.find(srb_id_t::srb1) != config.srb_cfg.end()) {
1166 auto& out_rlc = srb_cfg[srb_id_t::srb1].rlc;
1167 out_rlc.mode = rlc_mode::am;
1168 out_rlc.am = generate_rlc_am_config(config.srb_cfg.at(srb_id_t::srb1).rlc);
1169 } else {
1170 srb_cfg.at(srb_id_t::srb1).rlc = make_default_srb_rlc_config();
1171 }
1172 srb_cfg.at(srb_id_t::srb1).mac = make_default_srb_mac_lc_config(LCID_SRB1);
1173
1174 // SRB2
1175 srb_cfg.insert(std::make_pair(srb_id_t::srb2, du_srb_config{}));
1176 if (config.srb_cfg.find(srb_id_t::srb2) != config.srb_cfg.end()) {
1177 auto& out_rlc = srb_cfg[srb_id_t::srb2].rlc;
1178 out_rlc.mode = rlc_mode::am;
1179 out_rlc.am = generate_rlc_am_config(config.srb_cfg.at(srb_id_t::srb2).rlc);
1180 } else {
1181 srb_cfg.at(srb_id_t::srb2).rlc = make_default_srb_rlc_config();
1182 }
1183 srb_cfg.at(srb_id_t::srb2).mac = make_default_srb_mac_lc_config(LCID_SRB2);
1184
1185 // SRB3
1186 srb_cfg.insert(std::make_pair(srb_id_t::srb3, du_srb_config{}));
1187 if (config.srb_cfg.find(srb_id_t::srb3) != config.srb_cfg.end()) {
1188 auto& out_rlc = srb_cfg[srb_id_t::srb3].rlc;
1189 out_rlc.mode = rlc_mode::am;
1190 out_rlc.am = generate_rlc_am_config(config.srb_cfg.at(srb_id_t::srb3).rlc);
1191 } else {
1192 srb_cfg.at(srb_id_t::srb3).rlc = make_default_srb_rlc_config();
1193 }
1194 srb_cfg.at(srb_id_t::srb3).mac = make_default_srb_mac_lc_config(LCID_SRB3);
1195
1196 if (config.ntn_cfg.has_value()) {
1197 ntn_augment_rlc_parameters(config.ntn_cfg.value(), srb_cfg);
1198 }
1199 return srb_cfg;
1200}
rlc_config make_default_srb_rlc_config()
SRB1, SRB2 and SRB3 default configuration as per TS 38.331, 9.2.1.
Definition rlc_srb_config_factory.h:40
void ntn_augment_rlc_parameters(const ntn_config &ntn_cfg, std::map< srb_id_t, du_srb_config > &srb_cfgs)
Augments RLC parameters based on NTN configuration.
Definition gnb_appconfig_translators.cpp:1833
mac_lc_config make_default_srb_mac_lc_config(lcid_t lcid)
Generates default SRB MAC Logical Channel configuration for SRBs other than SRB0.
Definition mac_config_helpers.cpp:49
SRB Configuration, i.e. associated RLC and MAC configuration for SRBs in the DU.
Definition du_srb_config.h:31
std::map< srb_id_t, srb_appconfig > srb_cfg
QoS configuration.
Definition gnb_appconfig.h:1247

◆ generate_e2_config()

e2ap_configuration srsran::generate_e2_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a E2 configuration.

1785{
1786 e2ap_configuration out_cfg = srsran::config_helpers::make_default_e2ap_config();
1787 out_cfg.gnb_id = config.gnb_id;
1788 out_cfg.ran_node_name = config.ran_node_name;
1789 out_cfg.plmn = config.cells_cfg.front().cell.plmn;
1790 out_cfg.e2sm_kpm_enabled = config.e2_cfg.e2sm_kpm_enabled;
1791 out_cfg.e2sm_rc_enabled = config.e2_cfg.e2sm_rc_enabled;
1792
1793 return out_cfg;
1794}
bool e2sm_rc_enabled
Whether to enable RC service module.
Definition gnb_appconfig.h:668
bool e2sm_kpm_enabled
Whether to enable KPM service module.
Definition gnb_appconfig.h:667
E2AP configuration.
Definition e2ap_configuration.h:30
e2_appconfig e2_cfg
E2 configuration.
Definition gnb_appconfig.h:1235

◆ generate_e2ap_nw_config()

srsran::sctp_network_gateway_config srsran::generate_e2ap_nw_config ( const gnb_appconfig & config,
int ppid )

Converts and returns the given gnb application configuration to a E2AP Network Gateway configuration.

1757{
1759 out_cfg.connection_name = "NearRT-RIC";
1760 out_cfg.connect_address = config.e2_cfg.ip_addr;
1761 out_cfg.connect_port = config.e2_cfg.port;
1762 out_cfg.bind_address = config.e2_cfg.bind_addr;
1763 out_cfg.ppid = ppid;
1764
1765 if (config.e2_cfg.sctp_rto_initial >= 0) {
1766 out_cfg.rto_initial = config.e2_cfg.sctp_rto_initial;
1767 }
1768 if (config.e2_cfg.sctp_rto_min >= 0) {
1769 out_cfg.rto_min = config.e2_cfg.sctp_rto_min;
1770 }
1771 if (config.e2_cfg.sctp_rto_max >= 0) {
1772 out_cfg.rto_max = config.e2_cfg.sctp_rto_max;
1773 }
1774 if (config.e2_cfg.sctp_init_max_attempts >= 0) {
1775 out_cfg.init_max_attempts = config.e2_cfg.sctp_init_max_attempts;
1776 }
1777 if (config.e2_cfg.sctp_max_init_timeo >= 0) {
1778 out_cfg.max_init_timeo = config.e2_cfg.sctp_max_init_timeo;
1779 }
1780
1781 return out_cfg;
1782}
std::string bind_addr
Local IP address to bind for RIC connection.
Definition gnb_appconfig.h:661
int sctp_max_init_timeo
SCTP max init timeout for RIC connection.
Definition gnb_appconfig.h:666
int sctp_rto_min
SCTP RTO min for RIC connection.
Definition gnb_appconfig.h:663
int sctp_rto_max
SCTP RTO max for RIC connection.
Definition gnb_appconfig.h:664
int sctp_init_max_attempts
SCTP init max attempts for RIC connection.
Definition gnb_appconfig.h:665
int sctp_rto_initial
SCTP initial RTO value for RIC connection.
Definition gnb_appconfig.h:662
uint16_t port
RIC port.
Definition gnb_appconfig.h:660
std::string ip_addr
RIC IP address.
Definition gnb_appconfig.h:659
Configuration for SCTP network gateway.
Definition sctp_network_gateway.h:37

◆ generate_mac_expert_config()

mac_expert_config srsran::generate_mac_expert_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a mac expert configuration.

1689{
1691 const base_cell_appconfig& cell = config.cells_cfg.front().cell;
1692 out_cfg.configs.push_back({.max_consecutive_dl_kos = cell.pdsch_cfg.max_consecutive_kos,
1693 .max_consecutive_ul_kos = cell.pusch_cfg.max_consecutive_kos,
1694 .max_consecutive_csi_dtx = cell.pucch_cfg.max_consecutive_kos});
1695
1696 return out_cfg;
1697}
pucch_appconfig pucch_cfg
PUCCH configuration.
Definition gnb_appconfig.h:507
pdsch_appconfig pdsch_cfg
PDSCH configuration.
Definition gnb_appconfig.h:501
Implementation-specific parameters used to tune MAC operation.
Definition mac_config.h:36
unsigned max_consecutive_kos
Maximum number of consecutive DL KOs before an RLF is reported.
Definition gnb_appconfig.h:181
unsigned max_consecutive_kos
Maximum number of consecutive undecoded PUCCH Format 2 for CSI before an RLF is reported.
Definition gnb_appconfig.h:325
unsigned max_consecutive_kos
Maximum number of consecutive UL KOs before an RLF is reported.
Definition gnb_appconfig.h:225

◆ generate_mac_lc_config()

srsran::mac_lc_config srsran::generate_mac_lc_config ( const mac_lc_appconfig & in_cfg)

Converts and returns the given gnb MAC LC configuration to a MAC LC configuration.

1098{
1100
1101 out_mac.priority = in_cfg.priority;
1102 out_mac.lcg_id = uint_to_lcg_id(in_cfg.lc_group_id);
1103 out_mac.pbr = to_prioritized_bit_rate(in_cfg.prioritized_bit_rate_kBps);
1104 out_mac.bsd = to_bucket_size_duration(in_cfg.bucket_size_duration_ms);
1105 out_mac.lc_sr_mask = false;
1106 out_mac.lc_sr_delay_applied = false;
1107 out_mac.sr_id = uint_to_sched_req_id(0);
1108 return out_mac;
1109}
scheduling_request_id uint_to_sched_req_id(unsigned sr_id)
Convert unsigned to scheduling_request_id.
Definition sr_configuration.h:39
prioritized_bit_rate to_prioritized_bit_rate(unsigned pbr)
Returns the prioritized_bit_rate enum value corresponding to the given unsigned value.
Definition mac_lc_config.h:52
bucket_size_duration to_bucket_size_duration(unsigned bsd)
Returns the bucket_size_duration enum value corresponding to the given unsigned value.
Definition mac_lc_config.h:113
Configurations for MAC logical channel parameters.
Definition mac_lc_config.h:140
uint8_t priority
Definition mac_lc_config.h:143

◆ generate_ngap_nw_config()

srsran::sctp_network_gateway_config srsran::generate_ngap_nw_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a NGAP Network Gateway configuration.

81{
83 out_cfg.connection_name = "AMF";
84 out_cfg.connect_address = config.amf_cfg.ip_addr;
85 out_cfg.connect_port = config.amf_cfg.port;
86 if (config.amf_cfg.n2_bind_addr == "auto") {
87 out_cfg.bind_address = config.amf_cfg.bind_addr;
88 } else {
89 out_cfg.bind_address = config.amf_cfg.n2_bind_addr;
90 }
91 out_cfg.ppid = NGAP_PPID;
92
93 if (config.amf_cfg.sctp_rto_initial >= 0) {
94 out_cfg.rto_initial = config.amf_cfg.sctp_rto_initial;
95 }
96 if (config.amf_cfg.sctp_rto_min >= 0) {
97 out_cfg.rto_min = config.amf_cfg.sctp_rto_min;
98 }
99 if (config.amf_cfg.sctp_rto_max >= 0) {
100 out_cfg.rto_max = config.amf_cfg.sctp_rto_max;
101 }
102 if (config.amf_cfg.sctp_init_max_attempts >= 0) {
103 out_cfg.init_max_attempts = config.amf_cfg.sctp_init_max_attempts;
104 }
105 if (config.amf_cfg.sctp_max_init_timeo >= 0) {
106 out_cfg.max_init_timeo = config.amf_cfg.sctp_max_init_timeo;
107 }
108
109 return out_cfg;
110}

◆ generate_preferred_ciphering_algorithms_list()

srsran::security::preferred_ciphering_algorithms srsran::generate_preferred_ciphering_algorithms_list ( const gnb_appconfig & config)

Converts and returns the given gnb application ciphering protection algorithm preferences configuration to a CU-CP configuration.

923{
924 // String splitter helper
925 auto split = [](const std::string& s, char delim) -> std::vector<std::string> {
926 std::vector<std::string> result;
927 std::stringstream ss(s);
928 for (std::string item; getline(ss, item, delim);) {
929 result.push_back(item);
930 }
931 return result;
932 };
933
934 // > Remove spaces, convert to lower case and split on comma
935 std::string nea_preference_list = config.cu_cp_cfg.security_config.nea_preference_list;
936 nea_preference_list.erase(std::remove_if(nea_preference_list.begin(), nea_preference_list.end(), ::isspace),
937 nea_preference_list.end());
938 std::transform(nea_preference_list.begin(),
939 nea_preference_list.end(),
940 nea_preference_list.begin(),
941 [](unsigned char c) { return std::tolower(c); });
942 std::vector<std::string> nea_v = split(nea_preference_list, ',');
943
944 security::preferred_ciphering_algorithms algo_list = {};
945 int idx = 0;
946 for (const std::string& nea : nea_v) {
947 if (nea == "nea0") {
948 algo_list[idx] = security::ciphering_algorithm::nea0;
949 } else if (nea == "nea1") {
950 algo_list[idx] = security::ciphering_algorithm::nea1;
951 } else if (nea == "nea2") {
952 algo_list[idx] = security::ciphering_algorithm::nea2;
953 } else if (nea == "nea3") {
954 algo_list[idx] = security::ciphering_algorithm::nea3;
955 }
956 idx++;
957 }
958 return algo_list;
959}

◆ generate_preferred_integrity_algorithms_list()

srsran::security::preferred_integrity_algorithms srsran::generate_preferred_integrity_algorithms_list ( const gnb_appconfig & config)

Converts and returns the given gnb application integrity protection algorithm preferences configuration to a CU-CP configuration.

883{
884 // String splitter helper
885 auto split = [](const std::string& s, char delim) -> std::vector<std::string> {
886 std::vector<std::string> result;
887 std::stringstream ss(s);
888 for (std::string item; getline(ss, item, delim);) {
889 result.push_back(item);
890 }
891 return result;
892 };
893
894 // > Remove spaces, convert to lower case and split on comma
895 std::string nia_preference_list = config.cu_cp_cfg.security_config.nia_preference_list;
896 nia_preference_list.erase(std::remove_if(nia_preference_list.begin(), nia_preference_list.end(), ::isspace),
897 nia_preference_list.end());
898 std::transform(nia_preference_list.begin(),
899 nia_preference_list.end(),
900 nia_preference_list.begin(),
901 [](unsigned char c) { return std::tolower(c); });
902 std::vector<std::string> nea_v = split(nia_preference_list, ',');
903
904 security::preferred_integrity_algorithms algo_list = {};
905 int idx = 0;
906 for (const std::string& nea : nea_v) {
907 if (nea == "nia0") {
908 algo_list[idx] = security::integrity_algorithm::nia0;
909 } else if (nea == "nia1") {
910 algo_list[idx] = security::integrity_algorithm::nia1;
911 } else if (nea == "nia2") {
912 algo_list[idx] = security::integrity_algorithm::nia2;
913 } else if (nea == "nia3") {
914 algo_list[idx] = security::integrity_algorithm::nia3;
915 }
916 idx++;
917 }
918 return algo_list;
919}

◆ generate_rlc_am_config()

srsran::rlc_am_config srsran::generate_rlc_am_config ( const rlc_am_appconfig & in_cfg)

Converts and returns the given gnb RLC AM configuration to a RLC configuration.

1072{
1074 // AM Config
1075 //< TX SN
1076 if (!from_number(out_rlc.tx.sn_field_length, in_cfg.tx.sn_field_length)) {
1077 report_error("Invalid RLC AM TX SN: SN={}\n", in_cfg.tx.sn_field_length);
1078 }
1079 out_rlc.tx.t_poll_retx = in_cfg.tx.t_poll_retx;
1080 out_rlc.tx.max_retx_thresh = in_cfg.tx.max_retx_thresh;
1081 out_rlc.tx.poll_pdu = in_cfg.tx.poll_pdu;
1082 out_rlc.tx.poll_byte = in_cfg.tx.poll_byte;
1083 out_rlc.tx.max_window = in_cfg.tx.max_window;
1084 out_rlc.tx.queue_size = in_cfg.tx.queue_size;
1085 //< RX SN
1086 if (!from_number(out_rlc.rx.sn_field_length, in_cfg.rx.sn_field_length)) {
1087 report_error("Invalid RLC AM RX SN: SN={}\n", in_cfg.rx.sn_field_length);
1088 }
1089 out_rlc.rx.t_reassembly = in_cfg.rx.t_reassembly;
1090 out_rlc.rx.t_status_prohibit = in_cfg.rx.t_status_prohibit;
1091 if (in_cfg.rx.max_sn_per_status != 0) {
1092 out_rlc.rx.max_sn_per_status = in_cfg.rx.max_sn_per_status;
1093 }
1094 return out_rlc;
1095}
Configurable parameters for RLC AM.
Definition rlc_config.h:707

◆ generate_rrc_ssb_mtc()

srs_cu_cp::rrc_ssb_mtc srsran::generate_rrc_ssb_mtc ( unsigned period,
unsigned offset,
unsigned duration )

Converts and returns SSB periodicity, offset and duration into a valid SSB measurement and timing configuration.

51{
53 switch (period) {
54 case 5:
55 ssb_mtc.periodicity_and_offset.sf5.emplace() = offset;
56 break;
57 case 10:
58 ssb_mtc.periodicity_and_offset.sf10.emplace() = offset;
59 break;
60 case 20:
61 ssb_mtc.periodicity_and_offset.sf20.emplace() = offset;
62 break;
63 case 40:
64 ssb_mtc.periodicity_and_offset.sf40.emplace() = offset;
65 break;
66 case 80:
67 ssb_mtc.periodicity_and_offset.sf80.emplace() = offset;
68 break;
69 case 160:
70 ssb_mtc.periodicity_and_offset.sf160.emplace() = offset;
71 break;
72 default:
73 report_error("Invalid SSB periodicity {}\n", period);
74 }
75 ssb_mtc.dur = duration;
76
77 return ssb_mtc;
78}
Definition meas_types.h:98
Definition system_info_config.h:66

◆ generate_ru_config()

ru_configuration srsran::generate_ru_config ( const gnb_appconfig & config,
span< const du_cell_config > cells )

Converts and returns the given gnb application configuration to a Radio Unit configuration.

1543{
1545
1548 generate_ru_generic_config(cfg, config);
1550 ru_ofh_configuration& cfg = out_cfg.config.emplace<ru_ofh_configuration>();
1551 generate_ru_ofh_config(cfg, config, cells);
1552 } else {
1553 ru_dummy_configuration& cfg = out_cfg.config.emplace<ru_dummy_configuration>();
1554 generate_ru_dummy_config(cfg, config, cells);
1555 }
1556
1557 return out_cfg;
1558}
variant< ru_sdr_appconfig, ru_ofh_appconfig, ru_dummy_appconfig > ru_cfg
Radio Unit configuration.
Definition gnb_appconfig.h:1237
Radio Unit configuration.
Definition ru_configuration.h:33
Collects the necessary parameters for the dummy radio unit.
Definition ru_dummy_configuration.h:33
Radio Unit generic configuration.
Definition ru_generic_configuration.h:34
Radio Unit configuration for the Open Fronthaul implementation.
Definition ru_ofh_configuration.h:105

◆ generate_scheduler_expert_config()

scheduler_expert_config srsran::generate_scheduler_expert_config ( const gnb_appconfig & config)

Converts and returns the given gnb application configuration to a scheduler expert configuration.

1700{
1701 scheduler_expert_config out_cfg = config_helpers::make_default_scheduler_expert_config();
1702
1703 const base_cell_appconfig& cell = config.cells_cfg.front().cell;
1704
1705 // UE parameters.
1706 const pdsch_appconfig& pdsch = cell.pdsch_cfg;
1707 out_cfg.ue.dl_mcs = {pdsch.min_ue_mcs, pdsch.max_ue_mcs};
1708 out_cfg.ue.pdsch_rv_sequence.assign(pdsch.rv_sequence.begin(), pdsch.rv_sequence.end());
1709 out_cfg.ue.dl_harq_la_cqi_drop_threshold = pdsch.harq_la_cqi_drop_threshold;
1710 out_cfg.ue.dl_harq_la_ri_drop_threshold = pdsch.harq_la_ri_drop_threshold;
1711 out_cfg.ue.max_nof_harq_retxs = pdsch.max_nof_harq_retxs;
1712 out_cfg.ue.max_pdschs_per_slot = pdsch.max_pdschs_per_slot;
1713 out_cfg.ue.max_pdcch_alloc_attempts_per_slot = pdsch.max_pdcch_alloc_attempts_per_slot;
1714 out_cfg.ue.pdsch_nof_rbs = {pdsch.min_rb_size, pdsch.max_rb_size};
1715 out_cfg.ue.olla_dl_target_bler = pdsch.olla_target_bler;
1716 out_cfg.ue.olla_cqi_inc = pdsch.olla_cqi_inc;
1717 out_cfg.ue.olla_max_cqi_offset = pdsch.olla_max_cqi_offset;
1718 const pusch_appconfig& pusch = cell.pusch_cfg;
1719 if (config.ntn_cfg.has_value()) {
1720 out_cfg.ue.auto_ack_harq = true;
1721 }
1722 out_cfg.ue.ul_mcs = {pusch.min_ue_mcs, pusch.max_ue_mcs};
1723 out_cfg.ue.pusch_rv_sequence.assign(pusch.rv_sequence.begin(), pusch.rv_sequence.end());
1724 out_cfg.ue.initial_ul_dc_offset = pusch.dc_offset;
1725 out_cfg.ue.max_puschs_per_slot = pusch.max_puschs_per_slot;
1726 out_cfg.ue.olla_ul_target_bler = pusch.olla_target_bler;
1727 out_cfg.ue.olla_ul_snr_inc = pusch.olla_snr_inc;
1728 out_cfg.ue.olla_max_ul_snr_offset = pusch.olla_max_snr_offset;
1729
1730 // PUCCH and scheduler expert parameters.
1731 out_cfg.ue.max_ul_grants_per_slot = cell.ul_common_cfg.max_ul_grants_per_slot;
1732 out_cfg.ue.max_pucchs_per_slot = cell.ul_common_cfg.max_pucchs_per_slot;
1733
1734 // RA parameters.
1735 const prach_appconfig& prach = cell.prach_cfg;
1736
1737 out_cfg.ra.rar_mcs_index = pdsch.fixed_rar_mcs;
1738 out_cfg.ra.max_nof_msg3_harq_retxs = prach.max_msg3_harq_retx;
1739 out_cfg.ra.msg3_mcs_index = prach.fixed_msg3_mcs;
1740
1741 // SI parameters.
1742 out_cfg.si.sib1_mcs_index = pdsch.fixed_sib1_mcs;
1743 out_cfg.si.sib1_dci_aggr_lev = aggregation_level::n4;
1744
1745 // Logging and tracing.
1746 out_cfg.log_broadcast_messages = config.log_cfg.broadcast_enabled;
1747
1749 if (!error) {
1750 report_error("Invalid scheduler expert configuration detected.\n");
1751 }
1752
1753 return out_cfg;
1754}
error_type< std::string > is_scheduler_expert_config_valid(const scheduler_expert_config &config)
Checks whether the provided scheduler expert configuration is valid.
Definition scheduler_expert_config_validator.h:36
ul_common_appconfig ul_common_cfg
UL common configuration parameters.
Definition gnb_appconfig.h:497
PDSCH application configuration.
Definition gnb_appconfig.h:165
float olla_target_bler
DL Target BLER to be achieved with OLLA.
Definition gnb_appconfig.h:197
unsigned max_pdcch_alloc_attempts_per_slot
Maximum number of DL or UL PDCCH allocation attempts per slot.
Definition gnb_appconfig.h:193
float olla_cqi_inc
CQI offset increment used in outer loop link adaptation (OLLA) algorithm. If set to zero,...
Definition gnb_appconfig.h:195
unsigned fixed_rar_mcs
RAR modulation and coding scheme index.
Definition gnb_appconfig.h:173
unsigned max_pdschs_per_slot
Maximum number of PDSCH grants per slot.
Definition gnb_appconfig.h:191
unsigned fixed_sib1_mcs
SI modulation and coding scheme index.
Definition gnb_appconfig.h:175
unsigned max_nof_harq_retxs
Maximum number of times an HARQ process can be retransmitted, before it gets discarded.
Definition gnb_appconfig.h:179
float olla_max_cqi_offset
Maximum CQI offset that the OLLA algorithm can apply to the reported CQI.
Definition gnb_appconfig.h:199
unsigned min_rb_size
Minimum number of RBs for Resource Allocation of UE PDSCHs.
Definition gnb_appconfig.h:187
unsigned min_ue_mcs
Definition gnb_appconfig.h:168
uint8_t harq_la_ri_drop_threshold
Definition gnb_appconfig.h:211
uint8_t harq_la_cqi_drop_threshold
Definition gnb_appconfig.h:208
std::vector< unsigned > rv_sequence
Redundancy version sequence to use. Each element can have one of the following values: {0,...
Definition gnb_appconfig.h:183
unsigned max_ue_mcs
Definition gnb_appconfig.h:171
unsigned max_rb_size
Maximum number of RBs for Resource Allocation of UE PDSCHs.
Definition gnb_appconfig.h:189
PRACH application configuration.
Definition gnb_appconfig.h:57
PUSCH application configuration.
Definition gnb_appconfig.h:217
std::vector< unsigned > rv_sequence
Redundancy version sequence to use. Each element can have one of the following values: {0,...
Definition gnb_appconfig.h:227
float olla_max_snr_offset
Maximum CQI offset that the OLLA algorithm can apply to the reported CQI.
Definition gnb_appconfig.h:269
float olla_target_bler
UL Target BLER to be achieved with OLLA.
Definition gnb_appconfig.h:267
unsigned max_ue_mcs
Definition gnb_appconfig.h:223
float olla_snr_inc
UL SNR offset increment used in outer loop link adaptation (OLLA) algorithm. If set to zero,...
Definition gnb_appconfig.h:265
unsigned min_ue_mcs
Minimum modulation and coding scheme index for C-RNTI PUSCH allocations. Note that setting a high min...
Definition gnb_appconfig.h:220
dc_offset_t dc_offset
Direct Current (DC) offset, in number of subcarriers, used in PUSCH.
Definition gnb_appconfig.h:262
Scheduling statically configurable expert parameters.
Definition scheduler_expert_config.h:127
unsigned max_ul_grants_per_slot
Maximum number of PUSCH + PUCCH grants per slot.
Definition gnb_appconfig.h:352
unsigned max_pucchs_per_slot
Maximum number of PUCCH grants per slot.
Definition gnb_appconfig.h:350

◆ get_active_tdd_dl_symbols()

ofdm_symbol_range srsran::get_active_tdd_dl_symbols ( const tdd_ul_dl_config_common & cfg,
unsigned slot_index,
cyclic_prefix cp )

Calculates the number of active DL symbols in the current slot_index.

85{
86 const unsigned nof_symbols = nof_active_symbols(cfg, slot_index, cp, true);
87 return {0, nof_symbols};
88}

◆ get_active_tdd_ul_symbols()

ofdm_symbol_range srsran::get_active_tdd_ul_symbols ( const tdd_ul_dl_config_common & cfg,
unsigned slot_index,
cyclic_prefix cp )

Calculates the number of active UL symbols in the current slot_index.

92{
93 const unsigned nof_symbols = nof_active_symbols(cfg, slot_index, cp, false);
94 const unsigned symbols_per_slot = get_nsymb_per_slot(cp);
95 return nof_symbols > 0 ? ofdm_symbol_range{symbols_per_slot - nof_symbols, symbols_per_slot} : ofdm_symbol_range{};
96}
Range [start,stop) of OFDM symbols.
Definition ofdm_symbol_range.h:32

◆ get_allocator_ring_size_gt_min()

constexpr unsigned srsran::get_allocator_ring_size_gt_min ( unsigned minimum_value)
inlineconstexpr

Retrieves the resource grid allocator ring size greater than given minimum value.

Remarks
1. The implementation of circular ring based resource allocator only works correctly if we set a ring size which satisfies the condition NOF_SLOTS_PER_SYSTEM_FRAME % RING_ALLOCATOR_SIZE = 0. The condition is placed to avoid misalignment between (last_slot_ind + slot_delay) slot point and slot point contained in ((last_slot_ind + slot_delay) % RING_ALLOCATOR_SIZE) slot, which occurs when slot point is close to NOF_SLOTS_PER_SYSTEM_FRAME value. Misalignment example: Assume NOF_SLOTS_PER_SYSTEM_FRAME = 10240 and RING_ALLOCATOR_SIZE = 37 At Slot point (10238) % 37 = Element at index 26 of slots array/vector is accessed, similarly Slot point (10239) % 37 = 27 Now, Slot point wraps around NOF_SLOTS_PER_SYSTEM_FRAME and is set to 0, this causes Slot point (0) % 37 = 0. Resulting in element at index 0 of slots array/vector being accessed rather than index 28.
2. The reason for choosing values 20, 40 and 80 for RING_ALLOCATOR_SIZE is because it holds the condition NOF_SLOTS_PER_SYSTEM_FRAME % RING_ALLOCATOR_SIZE = 0. for all numerologies.
41{
42 if (minimum_value < 20) {
43 return 20;
44 }
45 if (minimum_value < 40) {
46 return 40;
47 }
48 return 640;
49}

◆ get_bits_per_symbol()

constexpr unsigned srsran::get_bits_per_symbol ( modulation_scheme mod)
inlineconstexpr

Bits per symbol for a given modulation scheme.

Parameters
[in]modModulation scheme.
Returns
The number of bits per modulated symbol (sometimes referred to as modulation order).
101{
102 if (mod == modulation_scheme::PI_2_BPSK) {
103 return 1;
104 }
105
106 return static_cast<unsigned>(mod);
107}
Here is the caller graph for this function:

◆ get_build_hash()

const char * srsran::get_build_hash ( )

Returns a formatted string containing the current commit hash.

29{
30 return build_hash;
31}

◆ get_build_info()

const char * srsran::get_build_info ( )

Returns a formatted string containing the current commit hash and branch name (if available).

34{
35 return build_info;
36}

◆ get_build_mode()

const char * srsran::get_build_mode ( )

Returns the selected (CMake) build mode as string.

39{
40 return build_mode;
41}

◆ get_c_rnti_pdsch_time_domain_list()

span< const pdsch_time_domain_resource_allocation > srsran::get_c_rnti_pdsch_time_domain_list ( const search_space_configuration & ss_cfg,
const bwp_downlink_common & active_bwp_dl_common,
const bwp_downlink_dedicated * active_bwp_dl_ded,
dmrs_typeA_position dmrs_typeA_pos )

Determines the time domain resource allocation table to be used for PDSCH as per TS 38.214, clause 5.1.2.1.1.

Parameters
[in]ss_cfgSearch Space configuration.
[in]active_bwp_dl_commonActive DL BWP common configuration.
[in]active_bwp_dl_dedActive DL BWP UE-dedicated configuration.
[in]dmrs_typeA_posDM-RS for mapping Type A position.
Returns
A list of valid PDSCH time-domain allocation configurations to choose from.
152{
153 const bool is_fallback = ss_cfg.is_common_search_space() and ss_cfg.get_coreset_id() == to_coreset_id(0);
154 srsran_assert(is_fallback or active_bwp_dl_ded != nullptr, "Invalid BWP DL dedicated configuration");
155
156 // See TS 38.214, Table 5.1.2.1.1-1: Applicable PDSCH time domain resource allocation for DCI formats 1_0 and 1_1.
157 if (not is_fallback) {
158 if (not active_bwp_dl_ded->pdsch_cfg->pdsch_td_alloc_list.empty()) {
159 // UE dedicated pdsch-TimeDomain list.
160 return active_bwp_dl_ded->pdsch_cfg->pdsch_td_alloc_list;
161 }
162 }
163
164 if (not active_bwp_dl_common.pdsch_common.pdsch_td_alloc_list.empty()) {
165 // common pdsch-TimeDomain list.
166 return active_bwp_dl_common.pdsch_common.pdsch_td_alloc_list;
167 }
168
169 // default A table case.
170 return pdsch_default_time_allocations_default_A_table(active_bwp_dl_common.generic_params.cp, dmrs_typeA_pos);
171}
span< const pdsch_time_domain_resource_allocation > pdsch_default_time_allocations_default_A_table(cyclic_prefix cp, dmrs_typeA_position dmrs_pos)
Determines the table of default PDSCH time-domain resource allocation A.
Definition pdsch_default_time_allocation.cpp:121
bool is_common_search_space() const
Returns whether SearchSpace if of Common SearchSpace(CSS) or UE Specific SearchSpace(USS).
Definition search_space.h:135

◆ get_c_rnti_pusch_time_domain_list()

span< const pusch_time_domain_resource_allocation > srsran::get_c_rnti_pusch_time_domain_list ( const search_space_configuration & ss_cfg,
const bwp_uplink_common & active_bwp_ul_common,
const bwp_uplink_dedicated * active_bwp_ul_ded )

Determines the time domain resource allocation table to be used for PUSCH as per TS 38.214, clause 6.1.2.1.1.

Parameters
ss_cfgSearch Space configuration.
active_bwp_ul_commonActive BWP UL common configuration.
active_bwp_ul_dedActive BWP UL UE-dedicated configuration.
Returns
A list of valid PUSCH time-domain allocation configurations to choose from.
155{
156 const bool is_fallback = ss_cfg.is_common_search_space() and ss_cfg.get_coreset_id() == to_coreset_id(0);
157 srsran_assert(is_fallback or active_bwp_ul_ded != nullptr, "Invalid BWP DL dedicated configuration");
158
159 // See TS 38.214, Table 6.1.2.1.1-1.
160 if (not is_fallback) {
161 if (active_bwp_ul_ded->pusch_cfg.has_value() and
162 (not active_bwp_ul_ded->pusch_cfg.value().pusch_td_alloc_list.empty())) {
163 // UE dedicated pusch-TimeDomain list.
164 return active_bwp_ul_ded->pusch_cfg.value().pusch_td_alloc_list;
165 }
166 }
167
168 if (active_bwp_ul_common.pusch_cfg_common.has_value() and
169 (not active_bwp_ul_common.pusch_cfg_common.value().pusch_td_alloc_list.empty())) {
170 // common pusch-TimeDomain list.
171 return active_bwp_ul_common.pusch_cfg_common.value().pusch_td_alloc_list;
172 }
173
174 // default A table case.
176 active_bwp_ul_common.generic_params.scs);
177}
span< const pusch_time_domain_resource_allocation > pusch_default_time_allocations_default_A_table(cyclic_prefix cp, subcarrier_spacing scs)
Determines the table of default PUSCH time-domain resource allocation A.
Definition pusch_default_time_allocation.cpp:121

◆ get_carrier_rb_dims()

crb_interval srsran::get_carrier_rb_dims ( const scs_specific_carrier & carrier_cfg)
inline

Derives Carrier CRB limits from scs-SpecificCarrier.

73{
74 return crb_interval{carrier_cfg.offset_to_carrier, carrier_cfg.offset_to_carrier + carrier_cfg.carrier_bandwidth};
75}
unsigned offset_to_carrier
Definition bwp_configuration.h:179
unsigned carrier_bandwidth
Width of this carrier in number of PRBs. Values: (0..MAX_NOF_PRBS).
Definition bwp_configuration.h:182

◆ get_cause_str() [1/2]

const char * srsran::get_cause_str ( const asn1::e1ap::cause_c & cause)
inline

Get string with E1AP error cause.

36{
37 using namespace asn1::e1ap;
38 switch (cause.type()) {
39 case cause_c::types_opts::radio_network:
40 return cause.radio_network().to_string();
41 case cause_c::types_opts::transport:
42 return cause.transport().to_string();
43 case cause_c::types_opts::protocol:
44 return cause.protocol().to_string();
45 case cause_c::types_opts::misc:
46 return cause.misc().to_string();
47 default:
48 break;
49 }
50 return "unknown";
51}

◆ get_cause_str() [2/2]

const char * srsran::get_cause_str ( const asn1::f1ap::cause_c & cause)
inline

Get string with F1AP error cause.

36{
37 using namespace asn1::f1ap;
38 switch (cause.type()) {
39 case cause_c::types_opts::radio_network:
40 return cause.radio_network().to_string();
41 case cause_c::types_opts::transport:
42 return cause.transport().to_string();
43 case cause_c::types_opts::protocol:
44 return cause.protocol().to_string();
45 case cause_c::types_opts::misc:
46 return cause.misc().to_string();
47 default:
48 break;
49 }
50 return "unknown";
51}

◆ get_coreset0_crbs()

crb_interval srsran::get_coreset0_crbs ( const pdcch_config_common & pdcch_cfg)
inline

Computes the CRB interval that delimits CORESET#0.

71{
72 unsigned rb_start = pdcch_cfg.coreset0->get_coreset_start_crb();
73 return {rb_start, rb_start + get_coreset_nof_prbs(*pdcch_cfg.coreset0)};
74}
unsigned get_coreset_nof_prbs(const coreset_configuration &cs_cfg)
Computes the number of RBs used to represent the CORESET.
Definition config_helpers.h:43

◆ get_coreset_crbs()

crb_interval srsran::get_coreset_crbs ( const coreset_configuration & cs_cfg)
inline

Computes the CRB interval that delimits CORESET.

65{
66 return {cs_cfg.get_coreset_start_crb(), get_coreset_end_crb(cs_cfg)};
67}
unsigned get_coreset_end_crb(const coreset_configuration &cs_cfg)
Computes the highest RB used by the CORESET.
Definition config_helpers.h:53

◆ get_coreset_end_crb()

unsigned srsran::get_coreset_end_crb ( const coreset_configuration & cs_cfg)
inline

Computes the highest RB used by the CORESET.

54{
55 static constexpr unsigned NOF_RBS_PER_GROUP = 6U;
56 if (cs_cfg.id == to_coreset_id(0)) {
57 return cs_cfg.coreset0_crbs().stop();
58 }
59 const uint64_t highest_bit = cs_cfg.freq_domain_resources().find_highest(0, cs_cfg.freq_domain_resources().size());
60 return highest_bit * NOF_RBS_PER_GROUP;
61}

◆ get_coreset_nof_prbs()

unsigned srsran::get_coreset_nof_prbs ( const coreset_configuration & cs_cfg)
inline

Computes the number of RBs used to represent the CORESET.

44{
45 static constexpr unsigned NOF_RBS_PER_GROUP = 6U;
46 if (cs_cfg.id == to_coreset_id(0)) {
47 return cs_cfg.coreset0_crbs().length();
48 }
49 return cs_cfg.freq_domain_resources().count() * NOF_RBS_PER_GROUP;
50}

◆ get_cpu_feature_info()

std::string srsran::get_cpu_feature_info ( )
inline
177{
178 fmt::memory_buffer buffer;
179 for (cpu_feature feature : cpu_features_included) {
180#ifdef __x86_64__
181 format_to(
182 buffer, "{}{}{}", buffer.size() == 0 ? "" : " ", feature, cpu_supports_feature(feature) ? "(ok)" : "(na)");
183#endif // __x86_64__
184#ifdef __aarch64__
185 format_to(buffer, "{}{}", buffer.size() == 0 ? "" : " ", feature);
186#endif // __aarch64__
187 }
188 return std::string{srsran::to_c_str(buffer)};
189}
const char * to_c_str(fmt::basic_memory_buffer< char, N > &mem_buffer)
Converts fmt memoryy buffer to c_str() without the need for conversion to intermediate std::string.
Definition format_utils.h:31

◆ get_crc_size()

constexpr unsigned srsran::get_crc_size ( crc_generator_poly poly)
inlineconstexpr
42{
43 switch (poly) {
44 case crc_generator_poly::CRC24A:
45 case crc_generator_poly::CRC24B:
46 case crc_generator_poly::CRC24C:
47 return 24;
48 case crc_generator_poly::CRC16:
49 return 16;
50 case crc_generator_poly::CRC11:
51 return 11;
52 case crc_generator_poly::CRC6:
53 default:
54 return 6;
55 }
56}

◆ get_csi_report_pucch_size()

units::bits srsran::get_csi_report_pucch_size ( const csi_report_configuration & config)

Gets the Channel State Information (CSI) report size when the CSI report is transmitted in PUCCH.

Field widths are defined in TS38.212 Section 6.3.1.1.2.

Parameters
[in]configCSI report configuration.
Returns
The report size in bits.
189{
192
193 // For each possible RI, find the largest CSI report size.
194 for (unsigned ri = 1, ri_end = nof_csi_antenna_ports + 1; ri != ri_end; ++ri) {
195 csi_report_size = std::max(csi_report_size, get_csi_report_size_ri(config, ri));
196 }
197
198 return csi_report_size;
199}

◆ get_csi_report_pusch_size()

csi_report_pusch_size srsran::get_csi_report_pusch_size ( const csi_report_configuration & config)

Calculates the Channel State Information (CSI) payload sizes when the CSI report is transmitted in PUSCH.

Field widths are defined in TS38.212 Section 6.3.2.1.2.

191{
192 csi_report_pusch_size result = {};
194
195 // Get CSI Part 1 field sizes which do not depend on the number of layers.
198
199 // Calculate CSI Part 1 size following TS38.212 Table 6.3.2.1.2-3.
200 result.part1_size = get_csi_report_part1_size(config, part1_sizes);
201
202 // Skip CSI Part 2 if there is one transmit port and no quantity is reported in CSI Part 2.
203 if ((nof_csi_antenna_ports == 1) || ((config.quantities != csi_report_quantities::cri_ri_li_pmi_cqi) &&
204 (config.quantities != csi_report_quantities::cri_ri_pmi_cqi))) {
205 return result;
206 }
207
208 // Prepare CSI Part 2 entry.
209 uci_part2_size_description::entry& entry = result.part2_correspondence.entries.emplace_back();
210
211 // Prepare RI field as parameter.
212 uci_part2_size_description::parameter& parameter = entry.parameters.emplace_back();
213 parameter.offset = part1_sizes.cri;
214 parameter.width = part1_sizes.ri;
215
216 // Fill the entry table in function of the RI.
217 for (unsigned i_rank = 1; i_rank <= nof_csi_antenna_ports; ++i_rank) {
218 // As per TS38.214 Section 5.2.2.2.1, the RI can only indicate rank values allowed by the RI restriction bitset. If
219 // the RI restriction bit corresponding to the current rank is not set, exclude the corresponding CSI Part 2 size.
220 if (!config.ri_restriction.test(i_rank - 1)) {
221 continue;
222 }
223
224 // Calculate CSI Part 2 size following TS38.212 Table 6.3.2.1.2-4.
225 units::bits part2_size = get_csi_report_part2_size(config, i_rank);
226
227 entry.map.emplace_back(part2_size.value());
228 }
229
230 result.part2_min_size = units::bits(*std::min_element(entry.map.begin(), entry.map.end()));
231 result.part2_max_size = units::bits(*std::max_element(entry.map.begin(), entry.map.end()));
232
233 return result;
234}
ri_li_cqi_cri_sizes get_ri_li_cqi_cri_sizes(pmi_codebook_type pmi_codebook, ri_restriction_type ri_restriction, csi_report_data::ri_type ri, unsigned nof_csi_rs_resources)
Gets the RI, LI, wideband CQI, and CRI fields bit-width.
Definition csi_report_on_puxch_helpers.cpp:98
unsigned nof_csi_rs_resources
Number of CSI-RS resources in the corresponding resource set.
Definition csi_report_configuration.h:65
Collects the parameters that describe the CSI report size transmitted in PUSCH.
Definition csi_report_pusch_size.h:30
Collects the RI, LI, wideband CQI, and CSI fields bit-width.
Definition csi_report_on_puxch_helpers.h:32
Collects the parameters to determine a single CSI Part 2 report.
Definition uci_part2_size_description.h:74
static_vector< uint16_t, max_size_table > map
Maps the concatenation of the parameters to Part 2 size in bits.
Definition uci_part2_size_description.h:79
static_vector< parameter, max_nof_parameters > parameters
Part 1 parameters that influence the size of this part 2.
Definition uci_part2_size_description.h:77
Collects parameter attributes.
Definition uci_part2_size_description.h:66
uint16_t offset
Bit offset of the parameter from the beginning of the Part 1.
Definition uci_part2_size_description.h:68
uint8_t width
CSI Part 1 parameter bit width.
Definition uci_part2_size_description.h:70

◆ get_csi_rs_pattern()

csi_rs_pattern srsran::get_csi_rs_pattern ( const csi_rs_pattern_configuration & config)

Generates the CSI-RS pattern.

439{
440 const unsigned row = config.csi_rs_mapping_table_row;
441 const unsigned nof_ports = csi_rs::get_nof_csi_rs_ports(row);
442
443 // Arrays to store the k_bar and l_bar symbol and RE positions for each port.
446
447 // Assert that the mapping table row is valid and currently supported.
448 srsran_assert(row <= 18 && row > 0, "Invalid mapping table row.");
449 srsran_assert(row <= 12, "Unsupported mapping table row");
450
451 // Frequency and symbol allocation references from the config.
453 const unsigned l_0 = config.symbol_l0;
454
455 // Calculate the RE mapping positions for each port.
456 switch (row) {
457 case 1:
458 mapping_row_1(k_bar, l_bar, k_ref, l_0, config);
459 break;
460 case 2:
461 mapping_row_2(k_bar, l_bar, k_ref, l_0, config);
462 break;
463 case 3:
464 mapping_row_3(k_bar, l_bar, k_ref, l_0, config);
465 break;
466 case 4:
467 mapping_row_4(k_bar, l_bar, k_ref, l_0, config);
468 break;
469 case 5:
470 mapping_row_5(k_bar, l_bar, k_ref, l_0, config);
471 break;
472 case 6:
473 mapping_row_6(k_bar, l_bar, k_ref, l_0, config);
474 break;
475 case 7:
476 mapping_row_7(k_bar, l_bar, k_ref, l_0, config);
477 break;
478 case 8:
479 mapping_row_8(k_bar, l_bar, k_ref, l_0, config);
480 break;
481 case 9:
482 mapping_row_9(k_bar, l_bar, k_ref, l_0, config);
483 break;
484 case 10:
485 mapping_row_10(k_bar, l_bar, k_ref, l_0, config);
486 break;
487 case 11:
488 mapping_row_11(k_bar, l_bar, k_ref, l_0, config);
489 break;
490 case 12:
491 mapping_row_12(k_bar, l_bar, k_ref, l_0, config);
492 break;
493 default:
494 break;
495 }
496
497 // Generate the RE patterns for each port.
498 return build_re_patterns(k_bar, l_bar, nof_ports, config);
499}
unsigned csi_rs_mapping_table_row
Row number of the CSI-RS location table, as defined in TS 38.211 Table 7.4.1.5.3-1.
Definition csi_rs_pattern.h:37
unsigned symbol_l0
The time domain location reference .
Definition csi_rs_pattern.h:43
static_vector< unsigned, CSI_RS_MAX_NOF_K_INDEXES > freq_allocation_ref_idx
Frequency domain allocation references .
Definition csi_rs_pattern.h:39

◆ get_dci_dl_format()

dci_dl_format srsran::get_dci_dl_format ( dci_dl_rnti_config_type rnti_dci_type)
inline

Retrieve DCI format from DCI DL payload format.

49{
50 return rnti_dci_type == dci_dl_rnti_config_type::c_rnti_f1_1 ? dci_dl_format::f1_1 : dci_dl_format::f1_0;
51}

◆ get_dci_sizes()

dci_sizes srsran::get_dci_sizes ( const dci_size_config & config)

DCI payload size alignment procedure.

Computes the DCI payload sizes, in number of bits, with the size alignment procedure specified in TS38.212 Section 7.3.1.0.

Parameters
[in]configRequired DCI size configuration parameters.
Returns
The DCI payload sizes in number of bits.
Remarks
The DCI size configuration parameters for DCI format 0_1 should be filled with the values corresponding to the DCI payload scrambled by C-RNTI. DCI payloads used for PUSCH Configured Grant Scheduling, which are scrambled by CS-RNTI, take the size of the DCI payload scrambled by C-RNTI, as per TS38.212 Section 7.3.1.1.2.
Configuring a UE to monitor DCI format 1_1 messages with different sizes in multiple search spaces associated with multiple CORESETs in a BWP is not currently supported. See TS38.212 Section 7.3.1.2.2.
697{
698 // Assert DCI size configuration parameters.
699 assert_dci_size_config(config);
700
702
703 // Step 0.
704 // - Determine DCI format 0_0 monitored in a common search space according to TS38.212 Section 7.3.1.1.1 where
705 // N_UL_BWP_RB is given by the size of the initial UL bandwidth part.
706 const dci_0_0_size format0_0_info_bits_common = dci_f0_0_bits_before_padding(config.ul_bwp_initial_bw);
707
708 // - Determine DCI format 1_0 monitored in a common search space according to TS38.212 Section 7.3.1.2.1 where
709 // N_DL_BWP_RB given by:
710 // - the size of CORESET 0 if CORESET 0 is configured for the cell
711 // - the size of initial DL bandwidth part if CORESET 0 is not configured for the cell.
713 dci_f1_0_bits_before_padding((config.coreset0_bw != 0) ? config.coreset0_bw : config.dl_bwp_initial_bw);
714
715 final_sizes.format0_0_common_size = format0_0_info_bits_common;
716 final_sizes.format1_0_common_size = format1_0_info_bits_common;
717
718 // - If DCI format 0_0 is monitored in common search space and if the number of information bits in the DCI format 0_0
719 // prior to padding is less than the payload size of the DCI format 1_0 monitored in common search space for
720 // scheduling the same serving cell, a number of zero padding bits are generated for the DCI format 0_0 until the
721 // payload size equals that of the DCI format 1_0.
723 // The number of padding bits is computed here, including the single bit UL/SUL field. This field is located after
724 // the padding, and it must only be included if the format 1_0 payload has a larger amount of bits before the
725 // padding bits than the format 0_0 payload. Therefore, the UL/SUL can be though of as a field that takes the space
726 // of the last padding bit within the format 0_0 payload, if present. See TS38.212 Sections 7.3.1.0 and 7.3.1.1.1.
727 final_sizes.format0_0_common_size.padding_incl_ul_sul =
729
730 // Update the DCI format 0_0 total payload size.
731 final_sizes.format0_0_common_size.total += final_sizes.format0_0_common_size.padding_incl_ul_sul;
732 }
733
734 // - If DCI format 0_0 is monitored in common search space and if the number of information bits in the DCI format 0_0
735 // prior to truncation is larger than the payload size of the DCI format 1_0 monitored in common search space for
736 // scheduling the same serving cell, the bitwidth of the frequency domain resource assignment field in the DCI format
737 // 0_0 is reduced by truncating the first few most significant bits such that the size of DCI format 0_0 equals the
738 // size of the DCI format 1_0.
741 final_sizes.format0_0_common_size.frequency_resource -= nof_truncated_bits;
742 final_sizes.format0_0_common_size.total -= nof_truncated_bits;
743 }
744
745 srsran_assert(final_sizes.format1_0_common_size.total == final_sizes.format0_0_common_size.total,
746 "DCI format 0_0 and 1_0 payload sizes must match");
747
748 // Step 1.
749 if (config.dci_0_0_and_1_0_ue_ss) {
750 // - Determine DCI format 0_0 monitored in a UE-specific search space according to TS38.212 Section 7.3.1.1.1 where
751 // N_UL_BWP_RB is the size of the active UL bandwidth part.
752 const dci_0_0_size format0_0_info_bits_ue = dci_f0_0_bits_before_padding(config.ul_bwp_active_bw);
753
754 // - Determine DCI format 1_0 monitored in a UE-specific search space according to TS38.212 Section 7.3.1.2.1 where
755 // N_DL_BWP_RB is the size of the active DL bandwidth part.
756 const dci_1_0_size format1_0_info_bits_ue = dci_f1_0_bits_before_padding(config.dl_bwp_active_bw);
757
758 // - For a UE configured with supplementaryUplink in ServingCellConfig in a cell, if PUSCH is configured to be
759 // transmitted on both the SUL and the non-SUL of the cell and if the number of information bits in DCI format 0_0
760 // in UE-specific search space for the SUL is not equal to the number of information bits in DCI format 0_0 in
761 // UE-specific search space for the non-SUL, a number of zero padding bits are generated for the smaller DCI format
762 // 0_0 until the payload size equals that of the larger DCI format 0_0.
763
764 // Not implemented.
765
766 final_sizes.format0_0_ue_size = format0_0_info_bits_ue;
767 final_sizes.format1_0_ue_size = format1_0_info_bits_ue;
768
769 // - If DCI format 0_0 is monitored in UE-specific search space and if the number of information bits in the DCI
770 // format 0_0 prior to padding is less than the payload size of the DCI format 1_0 monitored in UE-specific search
771 // space for scheduling the same serving cell, a number of zero padding bits are generated for the DCI format 0_0
772 // until the payload size equals that of the DCI format 1_0.
775 final_sizes.format0_0_ue_size.value().padding_incl_ul_sul = nof_padding_bits_incl_ul_sul;
776 final_sizes.format0_0_ue_size.value().total += nof_padding_bits_incl_ul_sul;
777 }
778
779 // - If DCI format 1_0 is monitored in UE-specific search space and if the number of information bits in the DCI
780 // format 1_0 prior to padding is less than the payload size of the DCI format 0_0 monitored in UE-specific search
781 // space for scheduling the same serving cell, zeros shall be appended to the DCI format 1_0 until the payload size
782 // equals that of the DCI format 0_0
783 else if (format1_0_info_bits_ue.total < format0_0_info_bits_ue.total) {
785 final_sizes.format1_0_ue_size.value().padding = nof_padding_bits;
786 final_sizes.format1_0_ue_size.value().total += final_sizes.format1_0_ue_size.value().padding;
787 }
788
789 srsran_assert(final_sizes.format1_0_ue_size.value().total == final_sizes.format0_0_ue_size.value().total,
790 "DCI format 0_0 and 1_0 payload sizes must match");
791 }
792
793 // Step 2.
794 if (config.dci_0_1_and_1_1_ue_ss) {
795 // Determine the size of DCI format 0_1 according to TS38.212 Section 7.3.1.1.2.
796 dci_0_1_size format0_1_ue_size = dci_f0_1_bits_before_padding(config);
797
798 // Determine the size of DCI format 1_1 according to TS38.212 Section 7.3.1.2.2.
799 dci_1_1_size format1_1_ue_size = dci_f1_1_bits_before_padding(config);
800
801 // - For a UE configured with supplementaryUplink in ServingCellConfig in a cell, if PUSCH is configured to be
802 // transmitted on both the SUL and the non-SUL of the cell and if the number of information bits in format 0_1 for
803 // the SUL is not equal to the number of information bits in format 0_1 for the non-SUL, zeros shall be appended to
804 // smaller format 0_1 until the payload size equals that of the larger format 0_1.
805
806 // Not implemented.
807
808 // - If the size of DCI format 0_1 monitored in a UE-specific search space equals that of a DCI format 0_0/1_0
809 // monitored in another UE-specific search space, one bit of zero padding shall be appended to DCI format 0_1.
810 if (config.dci_0_0_and_1_0_ue_ss && (format0_1_ue_size.total == final_sizes.format0_0_ue_size.value().total)) {
811 format0_1_ue_size.padding = units::bits(1);
812 format0_1_ue_size.total += format0_1_ue_size.padding;
813 }
814
815 // - If the size of DCI format 1_1 monitored in a UE-specific search space equals that of a DCI format 0_0/1_0
816 // monitored in another UE-specific search space, one bit of zero padding shall be appended to DCI format 1_1.
817 if (config.dci_0_0_and_1_0_ue_ss && (format1_1_ue_size.total == final_sizes.format1_0_ue_size.value().total)) {
818 format1_1_ue_size.padding = units::bits(1);
819 format1_1_ue_size.total += format1_1_ue_size.padding;
820 }
821
822 final_sizes.format0_1_ue_size = format0_1_ue_size;
823 final_sizes.format1_1_ue_size = format1_1_ue_size;
824 }
825
826 // Step 3.
827 // If both of the following conditions are fulfilled the size alignment procedure is complete.
828 // - The total number of different DCI sizes configured to monitor is no more than 4 for the cell.
829 // - The total number of different DCI sizes with C-RNTI configured to monitor is no more than 3 for the cell.
830
831 // Empty list of unique DCI sizes.
832 unique_dci_sizes_list unique_dci_sizes;
833
834 // Fallback DCI formats monitored in Common Search Space are always included.
835 unique_dci_sizes.insert_if_unique(final_sizes.format0_0_common_size.total.value());
836
837 // Fallback DCI formats monitored in UE-specific Search Space. Count them if they are included in the DCI size
838 // alignment procedure and the resulting payload size is different from the fallback DCI formats monitored in a CSS.
839 if (config.dci_0_0_and_1_0_ue_ss) {
840 unique_dci_sizes.insert_if_unique(final_sizes.format0_0_ue_size.value().total.value());
841 }
842
843 // Non-fallback DCI formats monitored in UE-specific Search Space. Count them if they are included in the DCI size
844 // alignment procedure and the resulting payload size is different from other DCI formats.
845 if (config.dci_0_1_and_1_1_ue_ss) {
846 unique_dci_sizes.insert_if_unique(final_sizes.format0_1_ue_size.value().total.value());
847 unique_dci_sizes.insert_if_unique(final_sizes.format1_1_ue_size.value().total.value());
848 }
849
850 // Get the actual number of distinct DCI payload sizes. No special DCI formats are implemented, so the most
851 // restrictive condition imposed by the size alignment procedure is no more than 3 DCI sizes scrambled by C-RNTI.
852 unsigned nof_c_rnti_dci_sizes = unique_dci_sizes.count();
853
854 // Step 4.
855 // If the above conditions are not met, set the size of the fallback DCI formats in a UE-specific Search Space to the
856 // size of the fallback DCI formats monitored in a Common Search Space.
857 if (nof_c_rnti_dci_sizes > 3) {
858 final_sizes.format0_0_ue_size = final_sizes.format0_0_common_size;
859 final_sizes.format1_0_ue_size = final_sizes.format1_0_common_size;
860 }
861
862 return final_sizes;
863}
DCI format 0_0 payload size parameters.
Definition dci_packing.h:379
DCI format 0_1 payload size parameters.
Definition dci_packing.h:405
DCI format 1_0 payload size parameters.
Definition dci_packing.h:392
DCI format 1_1 payload size parameters.
Definition dci_packing.h:450
unsigned ul_bwp_active_bw
Bandwidth of the active UL BWP in number of Resource Blocks.
Definition dci_packing.h:96
unsigned dl_bwp_active_bw
Bandwidth of the active DL BWP in number of Resource Blocks.
Definition dci_packing.h:92
bool dci_0_1_and_1_1_ue_ss
Flag for non-fallback DCI formats on a UE-specific Search Space.
Definition dci_packing.h:83
unsigned coreset0_bw
CORESET 0 DL bandwidth. Set to 0 if not configured.
Definition dci_packing.h:98
unsigned ul_bwp_initial_bw
Bandwidth of the initial UL BWP in number of Resource Blocks.
Definition dci_packing.h:94
bool dci_0_0_and_1_0_ue_ss
Flag for fallback DCI formats on a UE-specific Search Space.
Definition dci_packing.h:78

◆ get_dlsch_information()

dlsch_information srsran::get_dlsch_information ( const dlsch_configuration & config)

Gets the DL-SCH information for a given PDSCH configuration.

29{
30 dlsch_information result = {};
31
32 // Get shared channel parameters.
34
35 // Check whether the number of CDM groups without data is valid.
36 srsran_assert(config.nof_cdm_groups_without_data >= 1 &&
37 config.nof_cdm_groups_without_data <= get_max_nof_cdm_groups_without_data(config.dmrs_type),
38 "The number of CDM groups without data (i.e., {}) is invalid (min. 1, max. {}).",
40 get_max_nof_cdm_groups_without_data(config.dmrs_type));
41
42 // Make sure the OFDM symbol that carry DM-RS are within the time allocation.
43 srsran_assert(config.dmrs_symbol_mask.count() > 0,
44 "The number of OFDM symbols carrying DM-RS RE must be greater than zero.");
45 srsran_assert(
46 static_cast<unsigned>(config.dmrs_symbol_mask.find_lowest(true)) >= config.start_symbol_index,
47 "The index of the first OFDM symbol carrying DM-RS (i.e., {}) must be equal to or greater than the first symbol "
48 "allocated to transmission (i.e., {}).",
49 config.dmrs_symbol_mask.find_lowest(true),
50 config.start_symbol_index);
51 srsran_assert(static_cast<unsigned>(config.dmrs_symbol_mask.find_highest(true)) <
52 (config.start_symbol_index + config.nof_symbols),
53 "The index of the last OFDM symbol carrying DM-RS (i.e., {}) must be less than or equal to the last "
54 "symbol allocated "
55 "to transmission (i.e., {}).",
56 config.dmrs_symbol_mask.find_highest(true),
57 config.start_symbol_index + config.nof_symbols - 1);
58 srsran_assert(config.dmrs_symbol_mask.size() >= (config.start_symbol_index + config.nof_symbols),
59 "The DM-RS symbol mask size (i.e., {}) must be the same as the number of symbols allocated to the "
60 "transmission within the slot (i.e., {}).",
61 config.dmrs_symbol_mask.size(),
62 config.start_symbol_index + config.nof_symbols);
63
64 // Count number of OFDM symbols that contain DM-RS.
65 unsigned nof_symbols_dmrs = config.dmrs_symbol_mask.count();
66
67 // Count number of RE used for DM-RS.
68 unsigned nof_re_dmrs_per_rb =
69 nof_symbols_dmrs * config.nof_cdm_groups_without_data * get_nof_re_per_prb(config.dmrs_type);
70
71 // Count number of RE used for CSI-RS.
72 unsigned nof_re_csi_rs_per_rb = 0;
73
74 // Count number of RE used for PT-RS.
75 unsigned nof_pt_rs_per_rb = 0;
76
77 // Count total number of resource elements available for DL-SCH.
78 unsigned nof_re_dl_sch =
80
81 // Retrieve the modulation order.
82 unsigned modulation_order = get_bits_per_symbol(config.mcs_descr.modulation);
83
84 // Number of bits used for shared channel.
85 result.nof_dl_sch_bits = units::bits(nof_re_dl_sch * config.nof_layers * modulation_order);
86
87 return result;
88}
sch_information get_sch_segmentation_info(units::bits tbs, float target_code_rate)
Definition sch_segmentation.cpp:30
unsigned nof_cdm_groups_without_data
Number of CDM groups without data.
Definition dlsch_info.h:52
unsigned nof_layers
Number of transmission layers.
Definition dlsch_info.h:54
sch_mcs_description mcs_descr
Modulation and coding scheme.
Definition dlsch_info.h:40
unsigned nof_rb
Transmission bandwidth in resource blocks.
Definition dlsch_info.h:42
dmrs_config_type dmrs_type
DM-RS Type.
Definition dlsch_info.h:48
unsigned nof_symbols
Number of OFDM symbols used for the transmission.
Definition dlsch_info.h:46
unsigned start_symbol_index
First OFDM index for the transmission within the slot.
Definition dlsch_info.h:44
bounded_bitset< MAX_NSYMB_PER_SLOT > dmrs_symbol_mask
Boolean mask indicating which OFDM symbols in the slot contain DM-RS.
Definition dlsch_info.h:50
Collects Downlink Shared Channel (DL-SCH) derived parameters.
Definition dlsch_info.h:58
modulation_scheme modulation
Subcarrier modulation scheme.
Definition sch_mcs.h:39
constexpr float get_normalised_target_code_rate() const
Returns the target code rate normalised between 0 and 1.
Definition sch_mcs.h:52

◆ get_e2sm_kpm_28_552_metrics()

span< const e2sm_kpm_metric_t > srsran::get_e2sm_kpm_28_552_metrics ( )
inline
89{
90 // clang-format off
91 static const std::array<e2sm_kpm_metric_t, NOF_3GPP_TS_28_552_METRICS> metrics = {{
92 // 5.1.1 Performance measurements valid for all gNB deployment scenarios
93 // 5.1.1.1 Packet Delay
94 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
95 // 5.1.1.1.1 Average delay DL air-interface
96 // Description: This measurement provides the average (arithmetic mean) time it takes for packet transmission
97 // over the air-interface in the downlink direction.
98 {"DRB.AirIfDelayDl", NRCellDU, DER, REAL, "ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
99
100 // 5.1.1.1.2 Distribution of delay DL air-interface
101 // Description: This measurement is an integer representing the number of RLC SDU packets measured with the delay
102 // within the range of the bin.
103 // Note: bin width is vendor specific
104 {"DRB.AirIfDelayDist", NRCellDU, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
105
106 // 5.1.1.1.3 Average delay UL on over-the-air interface
107 // Description: This measurement provides the average (arithmetic mean) over-the-air packet delay on the uplink.
108 {"DRB.AirIfDelayUl", NRCellDU, DER, REAL, "ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
109
110 // 5.1.1.1.4 Average RLC packet delay in the UL
111 // Description: This measurement provides the average RLC packet delay on the uplink.
112 {"DRB.RlcDelayUl", NRCellDU, DER, REAL, "ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
113
114 // 5.1.1.1.5 Average PDCP re-ordering delay in the UL
115 // Description: This measurement provides the average (arithmetic mean) PDCP re-ordering delay on the uplink,
116 // i.e., the delay within the gNB-CU-UP.
117 {"DRB.PdcpReordDelayUl", GNBCUUP, DER, REAL, "ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
118
119 // 5.1.1.1.6 Distribution of DL delay between NG-RAN and UE
120 // Description: This measurement provides the distribution of DL packet delay between NG-RAN and UE, which
121 // is the delay incurred in NG-RAN (including the delay at gNB-CU-UP, on F1-U and on gNB-DU)
122 // and the delay over Uu interface.
123 // Note: bin width is vendor specific
124 // Note: source is NRCellCU (for non-split and 2-split scenario) or GNBCUUPFunction (for 3-split scenario)
125 {"DRB.DelayDlNgranUeDist", NRCellCU | GNBCUUP, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
126
127 // 5.1.1.1.7 Distribution of UL delay between NG-RAN and UE
128 // 5.1.1.1.7.1 Distribution of UL delay between NG-RAN and UE (excluding D1)
129 // Description: This measurement provides the distribution of UL packet delay between NG-RAN and UE, which includes
130 // the delay occurred in NG-RAN (including the delay at gNB-CU-UP, on F1-U and on gNB-DU) and the delay
131 // over Uu interface (excluding the D1 UL PDCP delay occurred in the UE).
132 // Note: bin width is vendor specific
133 // Note: source is NRCellCU (for non-split and 2-split scenario) or GNBCUUPFunction (for 3-split scenario)
134 {"DRB.DelayUlNgranUeDist", NRCellCU | GNBCUUP, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
135
136 // 5.1.1.1.7.2 Distribution of UL delay between NG-RAN and UE (including D1)
137 // Description: This measurement provides the distribution of UL packet delay between NG-RAN and UE, which includes
138 // the delay occurred in NG-RAN (including the delay at gNB-CU-UP, on F1-U and on gNB-DU), the delay
139 // over Uu interface and the D1 UL PDCP delay occurred in the UE.
140 // Note: bin width is vendor specific
141 // Note: source is NRCellCU (for non-split and 2-split scenario) or GNBCUUPFunction (for 3-split scenario)
142 {"DRB.DelayUlNgranUeIncD1Dist", NRCellCU | GNBCUUP, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
143
144 // 5.1.1.1.8 DL packet delay between NG-RAN and PSA UPF
145 // 5.1.1.1.8.1 Average DL GTP packet delay between PSA UPF and NG-RAN
146 // Description: This measurement provides the average DL GTP packet delay between PSA UPF and NG-RAN.
147 // Note: source is EP_N3 (contained by GNBCUUPFunction)
148 {"GTP.DelayDlPsaUpfNgranMean", GNBCUUP, DER, REAL, "us", FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
149
150 // 5.1.1.1.8.2 Distribution of DL GTP packet delay between PSA UPF and NG-RAN
151 // Description: This measurement provides the distribution of DL GTP packet delay between PSA UPF and NG-RAN.
152 // Note: bin width is vendor specific,
153 // Note: source is EP_N3 (contained by GNBCUUPFunction)
154 {"GTP.DelayDlPsaUpfNgranDist", GNBCUUP, DER, INTEGER, "-", DIST_BIN_X_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
155
156 // --------------------------------------------------------------------------------------------------------------- //
157 // 5.1.1.2 Radio resource utilization
158 // Note: Measurement definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 to allow E2_NODE_LEVEL and UE_LEVEL
159 // 5.1.1.2.1 DL Total PRB Usage
160 // Description: This measurement provides the total usage (in percentage) of physical resource blocks (PRBs)
161 // on the downlink for any purpose.
162 {"RRU.PrbTotDl", NRCellDU, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
163
164 // 5.1.1.2.2 UL Total PRB Usage
165 // Description: This measurement provides the total usage (in percentage) of physical resource blocks (PRBs)
166 // on the uplink for any purpose.
167 {"RRU.PrbTotUl", NRCellDU, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
168
169 // 5.1.1.2.3 Distribution of DL Total PRB Usage
170 // Description: This measurement provides the distribution of samples with total usage (in percentage) of physical
171 // resource blocks (PRBs) on the downlink in different ranges.
172 {"RRU.PrbTotDlDist", NRCellDU, CC, INTEGER, "%", DIST_BIN_X_LABEL | NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
173
174 // 5.1.1.2.4 Distribution of UL total PRB usage
175 // Description: This measurement provides the distribution of samples with total usage (in percentage) of physical
176 // resource blocks (PRBs) on the uplink in different usage ranges.
177 {"RRU.PrbTotUlDist", NRCellDU, CC, INTEGER, "%", DIST_BIN_X_LABEL | NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
178
179 // 5.1.1.2.5 Mean DL PRB used for data traffic
180 // Description: This measurement provides the number of physical resource blocks (PRBs) in average used in downlink
181 // for data traffic.
182 {"RRU.PrbUsedDl", NRCellDU, SI, INTEGER, "-", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL | NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
183
184 // 5.1.1.2.6 DL total available PRB
185 // Description: This measurement provides the total number of physical resource blocks (PRBs) in average available DL.
186 {"RRU.PrbAvailDl", NRCellDU, SI, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
187
188 // 5.1.1.2.7 Mean UL PRB used for data traffic
189 // Description: This measurement provides the number of physical resource blocks (PRBs) in average used in uplink
190 // for data traffic.
191 {"RRU.PrbUsedUl", NRCellDU, SI, INTEGER, "-", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL | NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
192
193 // 5.1.1.2.8 UL total available PRB
194 // Description: This measurement provides the total number of physical resource blocks (PRBs) available uplink.
195 {"RRU.PrbAvailUl", NRCellDU, SI, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
196
197 // 5.1.1.2.9 Peak DL PRB used for data traffic
198 // Description: This measurement provides the maximum number of PRBs used in downlink for data traffic.
199 {"RRU.MaxPrbUsedDl", NRCellDU, SI, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL | NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
200
201 // 5.1.1.2.10 Peak UL PRB used for data traffic
202 // Description: This measurement provides the number of PRBs used in uplink for data traffic.
203 {"RRU.MaxPrbUsedUl", NRCellDU, SI, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL | NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
204
205 // 5.1.1.2.11 PDSCH PRB Usage per cell for MIMO
206 // Description: This measurement provides the total usage (in percentage) of physical resource blocks (PRBs) per cell
207 // for MIMO with time domain averaged maximum scheduled layer number as spatial factor in the downlink.
208 {"RRU.PrbTotDlMimo", NRCellDU, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
209
210 // 5.1.1.2.12 PUSCH PRB Usage per cell for MIMO
211 // Description: This measurement provides the total usage (in percentage) of physical resource blocks (PRBs) per cell
212 // for MIMO with time domain averaged maximum scheduled layer number as spatial factor in the uplink.
213 {"RRU.PrbTotUlMimo", NRCellDU, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
214
215 // 5.1.1.2.13 SDM PDSCH PRB Usage
216 // Description: This measurement provides the total usage (in percentage) of PDSCH physical resource blocks (PRBs),
217 // based on statistical MIMO layers.
218 {"RRU.PrbTotSdmDl", NRCellDU, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
219
220 // 5.1.1.2.14 SDM PUSCH PRB Usage
221 // Description: This measurement provides the total usage (in percentage) of PUSCH physical resource blocks (PRBs),
222 // based on statistical MIMO layers.
223 {"RRU.PrbTotSdmUl", NRCellDU, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
224
225 // --------------------------------------------------------------------------------------------------------------- //
226 // 5.1.1.3 UE throughput
227 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
228 // 5.1.1.3.1 Average DL UE throughput in gNB
229 // Description: This measurement provides the average UE throughput in downlink.
230 // Note: seems that DRB.UEThpDl.BWP, where BWP identifies the Active BWP is not supported in KPM
231 {"DRB.UEThpDl", NRCellDU, DER, REAL, "kbps", FIVE_QI_LABEL | SLICE_ID_LABEL | PLMN_ID_LABEL | NO_LABEL, ALL_LEVELS},
232
233 // 5.1.1.3.2 Distribution of DL UE throughput in gNB
234 // Description: This measurement provides the distribution of the UE throughput in downlink.
235 {"DRB.UEThpDlDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL | PLMN_ID_LABEL, ALL_LEVELS},
236
237 // 5.1.1.3.3 Average UL UE throughput in gNB
238 // Description: This measurement provides the average UE throughput in uplink.
239 // Note: seems that DRB.UEThpDl.BWP, where BWP identifies the Active BWP is not supported in KPM
240 {"DRB.UEThpUl", NRCellDU, DER, REAL, "kbps", FIVE_QI_LABEL | SLICE_ID_LABEL | PLMN_ID_LABEL | NO_LABEL, ALL_LEVELS},
241
242 // 5.1.1.3.4 Distribution of UL UE throughput in gNB
243 // Description: This measurement provides the distribution of the UE throughput in uplink.
244 {"DRB.UEThpUlDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL | PLMN_ID_LABEL, ALL_LEVELS},
245
246 // 5.1.1.3.5 Percentage of unrestricted DL UE data volume in gNB
247 // Description: This measurement provides the percentage of DL data volume for UEs in the cell that is classified
248 // as unrestricted, i.e., when the volume is so low that all data can be transferred in one slot and
249 // no UE throughput sample could be calculated.
250 {"DRB.UEUnresVolDl", NRCellDU, SI, INTEGER, "%", FIVE_QI_LABEL | SLICE_ID_LABEL | PLMN_ID_LABEL, ALL_LEVELS},
251
252 // 5.1.1.3.6 Percentage of unrestricted UL UE data volume in gNB
253 // Description: This measurement provides the percentage of UL data volume for UEs in the cell that is classified
254 // as unrestricted, i.e., when the volume is so low that all data can be transferred in one slot and
255 // no UE throughput sample could be calculated.
256 {"DRB.UEUnresVolUl", NRCellDU, SI, INTEGER, "%", FIVE_QI_LABEL | SLICE_ID_LABEL | PLMN_ID_LABEL, ALL_LEVELS},
257
258 // 5.1.1.3.7 Average DL UE buffered Throughput per DRB
259 // Description: This measurement provides the average downlink buffered UE throughput per DRB on NRCellCU.
260 {"DRB.PDCP.UEThpDl", NRCellDU | GNBCUUP, DER, REAL, "kbps", FIVE_QI_LABEL, ALL_LEVELS},
261
262 // --------------------------------------------------------------------------------------------------------------- //
263 // 5.1.1.4 RRC connection number
264 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
265 // 5.1.1.4.1 Mean number of RRC Connections
266 // Description: This measurement provides the mean number of users in RRC connected mode for each NR cell during
267 // each granularity period.
268 {"RRC.ConnMean", NRCellCU, SI, INTEGER, "-", PLMN_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
269
270 // 5.1.1.4.2 Max number of RRC Connections
271 // Description: This measurement provides the maximum number of users in RRC connected mode for each NR cell during
272 // each granularity period.
273 {"RRC.ConnMax", NRCellCU, SI, INTEGER, "%", PLMN_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
274
275 // 5.1.1.4.3 Mean number of stored inactive RRC Connections
276 // Description: This measurement provides the mean number of users in RRC inactive mode for each NR cell during
277 // each granularity period.
278 {"RRC.InactiveConnMean", NRCellCU, SI, REAL, "-", PLMN_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
279
280 // 5.1.1.4.4 Max number of stored inactive RRC Connections
281 // Description: This measurement provides the max number of users in RRC inactive mode during each granularity period.
282 {"RRC.InactiveConnMax", NRCellCU, SI, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
283
284 // --------------------------------------------------------------------------------------------------------------- //
285 // 5.1.1.5 PDU Session Management
286 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
287 // 5.1.1.5.1 Number of PDU Sessions requested to setup
288 // Description: This measurement provides the number of PDU Sessions by the gNB.
289 // Note: mandatory SLICE_ID_LABEL
290 {"SM.PDUSessionSetupReq", NRCellCU, CC, INTEGER, "-", SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
291
292 //5.1.1.5.2 Number of PDU Sessions successfully setup
293 // Description: This measurement provides the number of PDU Sessions successfully setup by the gNB from AMF.
294 // Note: mandatory SLICE_ID_LABEL
295 {"SM.PDUSessionSetupSucc", NRCellCU, CC, INTEGER, "-", SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
296
297 // 5.1.1.5.3 Number of PDU Sessions failed to setup
298 // Description: This measurement provides the number of PDU Sessions failed to setup by the gNB.
299 // Note: mandatory Cause-label not supported in e2sm_kpm
300 {"SM.PDUSessionSetupFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
301
302 // 5.1.1.5.4 Mean number of PDU sessions being allocated
303 // Description: This measurement provides the mean number of PDU sessions that have been allocated in the NRCellCU.
304 // Note: mandatory SLICE_ID_LABEL
305 {"SM.MeanPDUSessionSetupReq", NRCellCU, SI, INTEGER, "-", SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
306
307 // 5.1.1.5.5 Peak number of PDU sessions being allocated
308 // Description: This measurement provides the peak number of PDU sessions that have been allocated in the NRCellCU.
309 // Note: mandatory SLICE_ID_LABEL
310 {"SM.MaxPDUSessionSetupReq", NRCellCU, SI, INTEGER, "-", SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
311
312 // --------------------------------------------------------------------------------------------------------------- //
313 // 5.1.1.6 Mobility Management
314 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
315 // 5.1.1.6.1 Inter-gNB handovers
316 // 5.1.1.6.1.1 Number of requested legacy handover preparations
317 // Description: This measurement provides the number of legacy handover preparations requested by the source gNB.
318 {"MM.HoPrepInterReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
319
320 // 5.1.1.6.1.2 Number of successful legacy handover preparations
321 // Description: This measurement provides the number of successful legacy handover preparations received by
322 // the source NR cell CU.
323 {"MM.HoPrepInterSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
324
325 // 5.1.1.6.1.3 Number of failed legacy handover preparations
326 // Description: This measurement provides the number of failed legacy handover preparations received by
327 // the source NR cell CU.
328 // Note: mandatory Cause-label not supported in e2sm_kpm
329 {"MM.HoPrepInterFail", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
330
331 // 5.1.1.6.1.4 Number of requested legacy handover resource allocations
332 // Description: This measurement provides the number of legacy handover resource allocation requests received
333 // by the target NR cell CU.
334 {"MM.HoResAlloInterReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
335
336 // 5.1.1.6.1.5 Number of successful legacy handover resource allocations
337 // Description: This measurement provides the number of successful legacy handover resource allocations at
338 // the target NR cell CU for the handover.
339 {"MM.HoResAlloInterSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
340
341 // 5.1.1.6.1.6 Number of failed legacy handover resource allocations
342 // Description: This measurement provides the number of failed legacy handover resource allocations at
343 // the target NR cell CU for the handover.
344 // Note: mandatory Cause-label not supported in e2sm_kpm
345 {"MM.HoResAlloInterFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
346
347 // 5.1.1.6.1.7 Number of requested legacy handover executions
348 // Description: This inter gNB handover measurement provides the number of outgoing legacy handover executions
349 // requested by the source gNB.
350 {"MM.HoExeInterReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
351
352 // 5.1.1.6.1.8 Number of successful legacy handover executions
353 // Description: This inter gNB handover measurement provides the number of successful legacy handover executions
354 // received by the source gNB.
355 {"MM.HoExeInterSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
356
357 // 5.1.1.6.1.9 Number of failed legacy handover executions
358 // Description: This inter gNB handover measurement provides the number of failed legacy handover executions for
359 // the source gNB.
360 // Note: mandatory Cause-label not supported in e2sm_kpm
361 // possible causes: MM.HoExeInterFail.UeCtxtRelCmd.cause; MM.HoExeInterFail.RrcReestabReq;
362 // MM.HoExeInterFail.HoExeSupTimer; MM.HoExeInterFail.RetrUeCtxtReq;
363 {"MM.HoExeInterFail", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
364
365 // 5.1.1.6.1.10 Mean Time of requested legacy handover executions
366 // Description: This measurement provides the mean time of inter gNB legacy handover executions during each
367 // granularity period.
368 {"MM.HoExeInterReq.TimeMean", NRCellCU, DER, INTEGER, "ms", SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
369
370 // 5.1.1.6.1.11 Max Time of requested legacy handover executions
371 // Description: This measurement provides the max time of inter gNB legacy handover executions during each
372 // granularity period.
373 {"MM.HoExeInterReq.TimeMax", NRCellCU, DER, INTEGER, "ms", SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
374
375 // 5.1.1.6.1.12 Number of successful handover executions per beam pair
376 // Description: This inter gNB handover measurement provides the number of successful handover executions received
377 // by the source gNB per beam pair, i.e. beam in the source and beam in the target cell.
378 // Note: do we need SSB_IDX_LABEL?
379 {"MM.HoExeInterSSBSucc", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
380
381 // 5.1.1.6.1.13 Number of failed handover executions per beam pair
382 // Description: This inter gNB handover measurement provides the number of failed handover executions for
383 // source gNB per beam pair.
384 // Note: do we need SSB_IDX_LABEL?
385 // Note: mandatory Cause-label not supported in e2sm_kpm
386 // possible causes: MM.HoExeInterSSBFail.UeCtxtRelCmd.cause; MM.HoExeInterSSBFail.RrcReestabReq;
387 // MM.HoExeInterSSBFail.HoExeSupTimer; MM.HoExeInterSSBFail.RetrUeCtxtReq;
388 {"MM.HoExeInterSSBFail", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
389
390 // 5.1.1.6.2 Intra-gNB handovers
391 // 5.1.1.6.2.1 Number of requested legacy handover executions
392 // Description: This measurement provides the number of outgoing intra gNB legacy handover executions requested
393 // by the source NRCellCU.
394 {"MM.HoExeIntraReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
395
396 // 5.1.1.6.2.2 Number of successful legacy handover executions
397 // Description: This measurement provides the number of successful intra gNB legacy handover executions received
398 // by the source NRCellCU.
399 {"MM.HoExeIntraSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
400
401 // 5.1.1.6.3 Handovers between 5GS and EPS
402 // 5.1.1.6.3.1 Number of requested preparations for handovers from 5GS to EPS
403 // Description: This measurement provides the number of preparations requested by the source gNB for the outgoing
404 // handovers from 5GS to EPS.
405 {"MM.HoOut5gsToEpsPrepReq", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
406
407 // 5.1.1.6.3.2 Number of successful preparations for handovers from 5GS to EPS
408 // Description: This measurement provides the number of successful preparations received by the source gNB for
409 // the outgoing handovers from 5GS to EPS.
410 {"MM.HoOut5gsToEpsPrepSucc", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
411
412 // 5.1.1.6.3.3 Number of failed preparations for handovers from 5GS to EPS
413 // Description: This measurement provides the number of failed preparations received by the source gNB for
414 // the outgoing handovers from 5GS to EPS.
415 // Note: mandatory Cause-label not supported in e2sm_kpm
416 {"MM.HoOut5gsToEpsPrepFail", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
417
418 // 5.1.1.6.3.4 Number of requested resource allocations for handovers from EPS to 5GS
419 // Description: This measurement provides the number of resource allocation requests received by the target gNB for
420 // handovers from EPS to 5GS.
421 {"MM.HoIncEpsTo5gsResAlloReq", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
422
423 // 5.1.1.6.3.5 Number of successful resource allocations for handovers from EPS to 5GS
424 // Description: This measurement provides the number of successful resource allocations at the target gNB for
425 // handovers from EPS to 5GS.
426 {"MM.HoIncEpsTo5gsResAlloSucc", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
427
428 // 5.1.1.6.3.6 Number of failed resource allocations for handovers from EPS to 5GS
429 // Description: This measurement provides the number of failed resource allocations at the target gNB for handovers
430 // from EPS to 5GS.
431 // Note: mandatory Cause-label not supported in e2sm_kpm
432 {"MM.HoIncEpsTo5gsResAlloFail", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
433
434 // 5.1.1.6.3.7 Number of requested executions for handovers from 5GS to EPS
435 // Description: This measurement provides the number of executions requested by the source gNB for handovers
436 // from 5GS to EPS.
437 {"MM.HoOutExe5gsToEpsReq", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
438
439 // 5.1.1.6.3.8 Number of successful executions for handovers from 5GS to EPS
440 // Description: This measurement provides the number of successful executions at the source gNB for handovers
441 // from 5GS to EPS.
442 {"MM.HoOutExe5gsToEpsSucc", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
443
444 // 5.1.1.6.3.9 Number of failed executions for handovers from 5GS to EPS
445 // Description: This measurement provides the number of failed executions at the source gNB for handovers
446 // from 5GS to EPS.
447 // Note: mandatory Cause-label not supported in e2sm_kpm
448 {"MM.HoOutExe5gsToEpsFail", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
449
450 // 5.1.1.6.3.10 Number of requested preparations for EPS fallback handovers
451 // Description: This measurement provides the number of EPS fallback preparations requested by the source gNB
452 // for the outgoing handovers from 5GS to EPS.
453 {"MM.HoOut5gsToEpsFallbackPrepReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
454
455 // 5.1.1.6.3.11 Number of successful preparations for EPS fallback handovers
456 // Description: This measurement provides the number of successful EPS fallback preparations received
457 // by the source gNB for the outgoing handovers from 5GS to EPS.
458 {"MM.HoOut5gsToEpsFallbackPrepSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
459
460 // 5.1.1.6.3.12 Number of failed preparations for EPS fallback handovers
461 // Description: This measurement provides the number of failed preparations received by the source gNB for
462 // the outgoing handovers from 5GS to EPS.
463 // Note: mandatory Cause-label not supported in e2sm_kpm
464 {"MM.HoOut5gsToEpsFallbackPrepFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
465
466 // 5.1.1.6.3.13 Number of successful executions for EPS fallback handovers
467 // Description: This measurement provides the number of successful EPS fallback executions at the source gNB
468 // for handovers from 5GS to EPS.
469 {"MM.HoOutExe5gsToEpsFallbackSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
470
471 // 5.1.1.6.3.14 Number of failed executions for EPS fallback handovers
472 // Description: This measurement provides the number of failed EPS fallback executions at the source gNB for
473 // handovers from 5GS to EPS.
474 // Note: mandatory Cause-label not supported in e2sm_kpm
475 {"MM.HoOutExe5gsToEpsFallbackFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
476
477 // 5.1.1.6.3.15 Mean Time of EPS fallback handover
478 // Description: This measurement provides the mean time of EPS fallback whole handover during each granularity period.
479 {"MM.Ho5gsToEpsFallbackTimeMean", NRCellCU, DER, INTEGER, "ms", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
480
481 // 5.1.1.6.3.16 Mean Time of EPS fallback handover executions
482 // Description: This measurement provides the mean time of EPS fallback handover executions during each
483 // granularity period.
484 {"MM.HoExeHo5gsToEpsFallbackTimeMean", NRCellCU, DER, INTEGER, "ms", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
485
486 // 5.1.1.6.4 RRC redirection measurement
487 // 5.1.1.6.4.1 Number of EPS fallback redirection
488 // Description: This measurement provides the number of RRC release for EPS fallback redirection.
489 {"MM.Redirection.5gsToEpsFallback", NRCellDU, SI, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
490
491 // 5.1.1.6.5 Intra/Inter-frequency Handover related measurements
492 // 5.1.1.6.5.1 Number of requested intra-frequency handover executions
493 // Description: This measurement provides the number of outgoing intra-frequency handover executions requested
494 // by the source NRCellCU.
495 {"MM.HoExeIntraFreqReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
496
497 // 5.1.1.6.5.2 Number of successful intra-frequency handover executions
498 // Description: This measurement provides the number of successful intra-frequency handover executions received
499 // by the source NRCellCU.
500 {"MM.HoExeIntraFreqSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
501
502 // 5.1.1.6.5.3 Number of requested inter-frequency handover executions
503 // Description: This measurement provides the number of outgoing inter-frequency handover executions requested
504 // by the source NRCellCU.
505 {"MM.HoExeInterFreqReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
506
507 // 5.1.1.6.5.4 Number of successful inter-frequency handover executions
508 // Description: This measurement provides the number of successful inter-frequency handover executions received
509 // by the source NRCellCU.
510 {"MM.HoExeInterFreqSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
511
512 // 5.1.1.6.6 Inter-gNB conditional handovers
513 // 5.1.1.6.6.1 Number of requested conditional handover preparations
514 // Description: This measurement provides the number of conditional handover preparations requested by the source gNB.
515 {"MM.ChoPrepInterReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
516
517 // 5.1.1.6.6.2 Number of successful conditional handover preparations
518 // Description: This measurement provides the number of successful conditional handover preparations received
519 // by the source NR cell CU.
520 {"MM.ChoPrepInterSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
521
522 // 5.1.1.6.6.3 Number of failed conditional handover preparations
523 // Description: This measurement provides the number of failed conditional handover preparations received
524 // by the source NR cell CU.
525 // Note: mandatory Cause-label not supported in e2sm_kpm
526 {"MM.ChoPrepInterFail", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
527
528 // 5.1.1.6.6.4 Number of requested conditional handover resource allocations
529 // Description: This measurement provides the number of conditional handover resource allocation requests received
530 // by the target NR cell CU.
531 {"MM.ChoResAlloInterReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
532
533 // 5.1.1.6.6.5 Number of successful conditional handover resource allocations
534 // Description: This measurement provides the number of successful conditional handover resource allocations
535 // at the target NR cell CU for the handover.
536 {"MM.ChoResAlloInterSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
537
538 // 5.1.1.6.6.6 Number of failed conditional handover resource allocations
539 // Description: This measurement provides the number of failed conditional handover resource allocations
540 // at the target NR cell CU for the handover.
541 // Note: mandatory Cause-label not supported in e2sm_kpm
542 {"MM.ChoResAlloInterFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
543
544 // 5.1.1.6.6.7 Number of configured conditional handover candidates
545 // Description: This inter gNB handover measurement provides the number of outgoing conditional handover candidates
546 // requested by the source gNB.
547 {"MM.ConfigInterReqCho", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
548
549 // 5.1.1.6.6.8 Number of UEs configured with conditional handover.
550 // Description: This inter-gNB handover measurement provides the number of UEs that has been configured with
551 // conditional handover by the source gNB.
552 {"MM.ConfigInterReqChoUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
553
554 // 5.1.1.6.6.9 Number of successful conditional handover executions
555 // Description: This inter-gNB handover measurement provides the number of successful conditional handover executions
556 // received by the source gNB.
557 {"MM.ChoExeInterSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
558
559 // 5.1.1.6.6.10 Void
560 // Note: empty in TS
561
562 // 5.1.1.6.6.11 Mean Time of requested conditional handover executions
563 // Description: This measurement provides the mean time of inter-gNB conditional handover executions during
564 // each granularity period.
565 {"MM.ChoExeInterReq.TimeMean", NRCellCU, DER, INTEGER, "ms", SLICE_ID_LABEL, E2_NODE_LEVEL},
566
567 // 5.1.1.6.6.12 Max Time of requested conditional handover executions
568 // Description: This measurement provides the max time of inter-gNB conditional handover executions during
569 // each granularity period.
570 {"MM.ChoExeInterReq.TimeMax", NRCellCU, DER, INTEGER, "ms", SLICE_ID_LABEL, E2_NODE_LEVEL},
571
572 // 5.1.1.6.6.13 Number of UEs for which conditional handover preparations are requested
573 // Description: This measurement provides the number of UEs for which conditional handover preparations
574 // were requested by the source gNB.
575 {"MM.ChoPrepInterReqUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
576
577 // 5.1.1.6.6.14 Number of UEs for which conditional handover preparations were successful
578 // Description: This measurement provides the number of UEs for which successful conditional handover preparations
579 // were received by the source NR cell CU.
580 {"MM.ChoPrepInterSuccUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
581
582 // 5.1.1.6.6.15 Number of UEs for which conditional handover preparations failed
583 // Description: This measurement provides the number of UEs for which conditional handover preparations failed,
584 // as received by the source NR cell CU.
585 // Note: mandatory Cause-label not supported in e2sm_kpm
586 {"MM.ChoPrepInterFailUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
587
588 // 5.1.1.6.7 Intra-gNB conditional handovers
589 // 5.1.1.6.7.1 Number of configured conditional handover candidates
590 // Description: This measurement provides the number of outgoing intra-gNB conditional handover candidates
591 // requested by the source NRCellCU.
592 {"MM.ConfigIntraReqCho", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
593
594 // 5.1.1.6.7.2 Number of UEs configured with conditional handover
595 // Description: This intra-gNB handover measurement provides the number of UEs that has been configured
596 // with conditional handover by the source cell.
597 {"MM.ConfigIntraReqChoUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
598
599 // 5.1.1.6.7.3 Number of successful handover executions
600 // Description: This measurement provides the number of successful intra-gNB handover executions received
601 // by the source NRCellCU.
602 {"MM.ChoExeIntraSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
603
604 // 5.1.1.6.8 Inter-gNB DAPS handovers
605 // 5.1.1.6.8.1 Number of requested DAPS handover preparations
606 // Description: This measurement provides the number of DAPS handover preparations requested by the source gNB.
607 {"MM.DapsHoPrepInterReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
608
609 // 5.1.1.6.8.2 Number of successful DAPS handover preparations
610 // Description: This measurement provides the number of successful DAPS handover preparations received
611 // by the source NR cell CU.
612 {"MM.DapsHoPrepInterSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
613
614 // 5.1.1.6.8.3 Number of failed DAPS handover preparations
615 // Description: This measurement provides the number of failed DAPS handover preparations received
616 // by the source NR cell CU.
617 // Note: mandatory Cause-label not supported in e2sm_kpm
618 {"MM.DapsHoPrepInterFail", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
619
620 // 5.1.1.6.8.4 Number of requested DAPS handover resource allocations
621 // Description: This measurement provides the number of DAPS handover resource allocation requests received
622 // by the target NR cell CU.
623 {"MM.DapsHoResAlloInterReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
624
625 // 5.1.1.6.8.5 Number of successful DAPS handover resource allocations
626 // Description: This measurement provides the number of successful DAPS handover resource allocations
627 // at the target NR cell CU for the handover.
628 {"MM.DapsHoResAlloInterSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
629
630 // 5.1.1.6.8.6 Number of failed DAPS handover resource allocations
631 // Description: This measurement provides the number of failed DAPS handover resource allocations
632 // at the target NR cell CU for the handover.
633 // Note: mandatory Cause-label not supported in e2sm_kpm
634 {"MM.DapsHoResAlloInterFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
635
636 // 5.1.1.6.8.7 Number of requested DAPS handover executions
637 // Description: This inter gNB handover measurement provides the number of outgoing DAPS handover executions
638 // requested by the source gNB.
639 {"MM.DapsHoExeInterReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
640
641 // 5.1.1.6.8.8 Number of successful DAPS handover executions
642 // Description: This inter gNB handover measurement provides the number of successful DAPS handover executions
643 // received by the source gNB.
644 {"MM.DapsHoExeInterSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
645
646 // 5.1.1.6.8.9 Number of failed DAPS handover executions
647 // Description: This inter gNB handover measurement provides the number of failed DAPS handover executions.
648 // Note: mandatory Cause-label not supported in e2sm_kpm
649 // Note: possible causes: MM.DapsHoExeInterFail.UeCtxtRelCmd.cause; MM.DapsHoExeInterFail.RrcReestabReq;
650 // MM.DapsHoExeInterFail.HoExeSupTimer; MM.DapsHoExeInterFail.RetrUeCtxtReq;
651 // MM.DapsHoExeInterFail.FailInfo.
652 {"MM.DapsHoExeInterFail", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
653
654 // 5.1.1.6.9 Intra-gNB DAPS handovers
655 // 5.1.1.6.9.1 Number of requested handovers
656 // Description: This measurement provides the nof outgoing intra-gNB DAPS handovers requested by the source NRCellCU.
657 {"MM.DapsHoExeIntraReq", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
658
659 // 5.1.1.6.9.2 Number of successful DAPS handovers
660 // Description: This measurement provides the nof successful intra-gNB DAPS handovers received by the source NRCellCU.
661 {"MM.DapsHoExeIntraSucc", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
662
663 // --------------------------------------------------------------------------------------------------------------- //
664 // 5.1.1.7 TB related Measurements
665 // 5.1.1.7.1 Total number of DL initial TBs
666 // Description: This measurement provides the total number of initial TBs transmitted on the downlink in a cell.
667 // HARQ re-transmissions are excluded from this measurement.
668 // Note: This measurement is optionally split into subcounters per modulation schema, e.g., TB.TotNbrDlInitial.64Qam
669 // Note: seems there is no related label in kpm
670 {"TB.TotNbrDlInitial", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
671
672 // 5.1.1.7.2 Intial error number of DL TBs
673 // Description: This measurement provides the number of initial faulty TBs transmitted on the downlink in a cell.
674 // Note: This measurement is optionally split into subcounters per modulation schema, e.g., TB.IntialErrNbrDl.64Qam
675 // Note: seems there is no related label in kpm
676 {"TB.IntialErrNbrDl", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
677
678 // 5.1.1.7.3 Total number of DL TBs
679 // Description: This measurement provides the total number of TBs transmitted on the downlink in a cell.
680 // This measurement includes all transmitted TBs (including the successful and failed TBs during initial
681 // transmission and HARQ re-transmission).
682 // Note: The measurement is split into subcounters per layer at MU-MIMO case.
683 {"TB.TotNbrDl", NRCellDU, CC, INTEGER, "-", LAYER_MU_MIMO_LABEL, E2_NODE_LEVEL},
684
685 // 5.1.1.7.4 Total error number of DL TBs
686 // Description: This measurement provides the number of total faulty TBs transmitted on the downlink in a cell.
687 // This measurement include all transmitted faulty TBs of initial transmission and re-transmission.
688 // Note: The measurement is split into subcounters per layer at MU-MIMO case.
689 {"TB.ErrTotNbrDl", NRCellDU, CC, INTEGER, "-", LAYER_MU_MIMO_LABEL, E2_NODE_LEVEL},
690
691 // 5.1.1.7.5 Residual error number of DL TBs
692 // Description: This measurement provides the number of final faulty TBs transmitted on the downlink in a cell
693 // at last HARQ re-transmissions.
694 {"TB.ResidualErrNbrDl", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
695
696 // 5.1.1.7.6 Total number of UL initial TBs
697 // Description: This measurement provides the total number of initial TBs on the uplink in a cell.
698 // Note: This measurement is optionally split into subcounters per modulation schema, e.g., TB.TotNbrUlInit.64Qam
699 // Note: seems there is no related label in kpm
700 {"TB.TotNbrUlInit", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
701
702 // 5.1.1.7.7 Error number of UL initial TBs
703 // Description: This measurement provides the number of initial faulty TBs on the uplink in a cell.
704 // Note: This measurement is optionally split into subcounters per modulation schema, e.g., TB.TotNbrUlInit.64Qam
705 // Note: seems there is no related label in kpm
706 {"TB.ErrNbrUlInitial", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
707
708 // 5.1.1.7.8 Total number of UL TBs
709 // Description: This measurement provides the total number of TBs on the uplink in a cell.This measurement includes
710 // all transmitted TBs (including the successful and failed TBs during initial transmission and
711 // HARQ re-transmission).
712 // Note: The measurement is split into subcounters per layer at MU-MIMO case.
713 {"TB.TotNbrUl", NRCellDU, CC, INTEGER, "-", LAYER_MU_MIMO_LABEL, E2_NODE_LEVEL},
714
715 // 5.1.1.7.9 Total error number of UL TBs
716 // Description: This measurement provides the number of total faulty TBs on the uplink in a cell.
717 // This measurement include all transmitted faulty TBs of initial and re-transmission .
718 // Note: The measurement is split into subcounters per layer at MU-MIMO case.
719 {"TB.ErrTotNbrUl", NRCellDU, CC, INTEGER, "-", LAYER_MU_MIMO_LABEL, E2_NODE_LEVEL},
720
721 // 5.1.1.7.10 Residual error number of UL TBs
722 // Description: This measurement provides the number of final faulty TBs on the uplink in a cell.
723 {"TB.ResidualErrNbrUl", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
724
725 // 5.1.1.8 Void - empty in TS
726 // 5.1.1.9 Void - empty in TS
727
728 // --------------------------------------------------------------------------------------------------------------- //
729 // 5.1.1.10 DRB related measurements
730 // Note: Measurement definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE and UE levels.
731 // 5.1.1.10.1 Number of DRBs attempted to setup
732 // Description: This measurement provides the number of DRBs attempted to setup to support all requested QoS
733 // flows in the PDU sessions to be setup by the INITIAL CONTEXT SETUP REQUESTs,
734 // PDU SESSION RESOURCE SETUP REQUESTs and PDU SESSION RESOURCE MODIFY REQUEST message received
735 // by the gNB from AMF.
736 {"DRB.EstabAtt", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
737
738 // 5.1.1.10.2 Number of DRBs successfully setup
739 // Description: This measurement provides the number of DRBs successfully setup to support all requested QoS flows
740 // in the PDU sessions to be setup by the INITIAL CONTEXT SETUP REQUESTs, PDU SESSION RESOURCE SETUP
741 // REQUESTs and PDU SESSION RESOURCE MODIFY REQUEST message received by the gNB from AMF.
742 {"DRB.EstabSucc", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
743
744 // 5.1.1.10.3 Number of released active DRBs
745 // Description: This measurement provides the nof abnormally released DRBs that were active at the time of release.
746 {"DRB.RelActNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
747
748 // 5.1.1.10.4 In-session activity time for DRB
749 // Description: This measurement provides the aggregated active session time for DRBs in a cell.
750 // Note: number of "in session" seconds aggregated for DRBs with a certain mapped 5QI level or for a certain S-NSSAI
751 // Note: Unit changed from s to ms in O-RAN.WG3.E2SM-KPM-R003-v3.00
752 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
753 {"DRB.SessionTime", NRCellCU, CC, INTEGER, "ms", FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
754
755 // 5.1.1.10.5 Number of Initial DRBs attempted to setup
756 // Description: This measurement provides the number of initial DRBs attempted to setup to support all requested
757 // QoS flows in the PDU sessions to be setup by the INITIAL CONTEXT SETUP REQUEST messages received
758 // by the gNB from AMF.
759 {"DRB.InitialEstabAtt", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
760
761 // 5.1.1.10.6 Number of Initial DRBs successfully setup
762 // Description: This measurement provides the number of initial DRBs successfully setup to support all requested
763 // QoS flows in the PDU sessions to be setup by the INITIAL CONTEXT SETUP REQUEST messages received
764 // by the gNB from AMF.
765 {"DRB.InitialEstabSucc", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
766
767 // 5.1.1.10.7 Number of DRBs attempted to be resumed
768 // Description: This measurement provides the number of DRBs attempted to be resumed.
769 {"DRB.ResumeAtt", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
770
771 // 5.1.1.10.8 Number of DRBs successfuly resumed
772 // Description: This measurement provides the total successful number of DRBs successfuly resumed.
773 {"DRB.ResumeSucc", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
774
775 // 5.1.1.10.9 Mean number of DRBs being allocated
776 // Description: This measurement provides the mean number of DRBs that have been allocated.
777 // Note: why not REAL if mean?
778 {"DRB.MeanEstabSucc", NRCellCU, SI, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
779
780 // 5.1.1.10.10 Peak number of DRBs being allocated
781 // Description: This measurement provides the peak number of DRBs that have been allocated.
782 {"DRB.MaxEstabSucc", NRCellCU, SI, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
783
784 // 5.1.1.10.11 Mean number of DRBs undergoing from User Plane Path Failures
785 // Description: This measurement provides the number of DRB’s prone to GTP-U Error Indication, the 5G CU-UP shall
786 // return a GTP-U Error Indication if it does not have a corresponding GTP-U context.
787 // Note: why not REAL if mean?
788 {"DRB.GTPUPathFailure", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
789
790 // 5.1.1.10.12 Number of DRBs attempted to setup in case of Dual Connectivity
791 // Description: This measurement provides the number of DRBs attempted to setup to support all requested QoS flows
792 // in the PDU sessions to be setup by the S-NODE ADDITION REQUESTs and S-NODE MODIFICATION REQUESTs
793 // message received by the S-NG-RAN node from M-NG-RAN node .
794 {"DRB.EstabAttDC", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
795
796 // 5.1.1.10.13 Number of DRBs successfully setup in case of Dual Connectivity
797 // Description: This measurement provides the number of DRBs successfully setup to support all requested QoS flows
798 // in the PDU sessions to be setup by the S-NODE ADDITION REQUESTs and S-NODE MODIFICATION REQUESTs
799 // message received by the S-NG-RAN node from M-NG-RAN node .
800 {"DRB.EstabSuccDC", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
801
802 // --------------------------------------------------------------------------------------------------------------- //
803 // 5.1.1.11 CQI related measurements
804 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
805 // 5.1.1.11.1 Wideband CQI distribution
806 // Description: This measurement provides the distribution of Wideband CQI (Channel Quality Indicator)
807 // reported by UEs in the cell.
808 // Note: CARR.WBCQIDist.BinX.BinY.BinZ, where X represents the index of the CQI value (0 to 15).
809 // Y represents the index of rank value (1 to 8), Z represents the index of table value (1 to 4).
810 {"CARR.WBCQIDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | DIST_BIN_Y_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
811
812 // --------------------------------------------------------------------------------------------------------------- //
813 // 5.1.1.12 MCS related Measurements
814 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
815 // 5.1.1.12.1 MCS Distribution in PDSCH
816 // Description: This measurement provides the distribution of the MCS scheduled for PDSCH RB by NG-RAN.
817 // Note: CARR.PDSCHMCSDist.BinX.BinY.BinZ, where X represents the index of rank value (1 to 8),
818 // Y represents the index of table value (1 to 3), and Z represents the index of the MCS value (0 to 31).
819 {"CARR.PDSCHMCSDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | DIST_BIN_Y_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
820
821 // 5.1.1.12.2 MCS Distribution in PUSCH
822 // Description: This measurement provides the distribution of the MCS scheduled for PUSCH RB by NG-RAN.
823 // Note: CARR.PUSCHMCSDist.BinX.BinY.BinZ, where X represents the index of rank value (1 to 8),
824 // Y represents the index of table value (1 to 2), and Z represents the index of the MCS value (0 to 31).
825 {"CARR.PUSCHMCSDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | DIST_BIN_Y_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
826
827 // 5.1.1.12.3 PDSCH MCS Distribution for MU-MIMO
828 // Description: This measurement provides the distribution of the MCS scheduled for PDSCH RB by NG-RAN
829 // in MU-MIMO scenario.
830 // Note: CARR.MUPDSCHMCSDist.BinX, where X represents the index of the MCS value (0 to 31).
831 {"CARR.MUPDSCHMCSDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
832
833 // 5.1.1.12.4 PUSCH MCS Distribution for MU-MIMO
834 // Description: This measurement provides the distribution of the MCS scheduled for PUSCH RB by NG-RAN
835 // in MU-MIMO scenario.
836 // Note: CARR. MUPUSCHMCSDist.BinX, where X represents the index of the MCS value (0 to 31).
837 {"CARR.MUPUSCHMCSDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
838
839 // --------------------------------------------------------------------------------------------------------------- //
840 // 5.1.1.13 QoS flow related measurements
841 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
842 // 5.1.1.13.1 QoS flow release
843 // 5.1.1.13.1.1 Number of released active QoS flows
844 // Description: This measurement provides the number of released QoS flows that were active at the time of release.
845 // Note: The nof measurements is equal to the nof QoS flows plus a possible sum value identified by the .sum suffix.
846 {"QF.RelActNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SUM_LABEL, E2_NODE_LEVEL | UE_LEVEL},
847
848 // 5.1.1.13.1.2 Number of QoS flows attempted to release
849 // Description: This measurement provides the number of QoS flows attempted to release.
850 {"QF.ReleaseAttNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
851
852 // 5.1.1.13.2 QoS flow activity
853 // 5.1.1.13.2.1 In-session activity time for QoS flow
854 // Description: This measurement provides the aggregated active session time for QoS flow in a cell.
855 // Note: The nof measurements is equal to the nof QoS levels plus a possible sum value identified by the .sum suffix.
856 // Note: Unit changed from s to ms in O-RAN.WG3.E2SM-KPM-R003-v3.00
857 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
858 {"QF.SessionTimeQoS", NRCellCU, CC, INTEGER, "ms", FIVE_QI_LABEL | SUM_LABEL, ALL_LEVELS},
859
860 // 5.1.1.13.2.2 In-session activity time for UE
861 // Description: This measurement provides the aggregated active session time for UEs in a cell.
862 // Note: Unit changed from s to ms in O-RAN.WG3.E2SM-KPM-R003-v3.00
863 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
864 {"QF.SessionTimeUE", NRCellCU, CC, INTEGER, "ms", NO_LABEL, ALL_LEVELS},
865
866 // 5.1.1.13.3 QoS flow setup
867 // 5.1.1.13.3.1 Number of QoS flow attempted to setup
868 // Description: This measurement provides the number of QoS flows attempted to setup.
869 // Note: The nof measurements is equal to the nof QoS levels plus the number of S-NSSAIs, plus a possible sum value
870 // identified by the .sum suffix.
871 {"QF.EstabAttNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL | SUM_LABEL, E2_NODE_LEVEL | UE_LEVEL},
872
873 // 5.1.1.13.3.2 Number of QoS flow successfully established
874 // Description: This measurement provides the number of QoS flows successfully established.
875 // Note: The nof measurements is equal to the nof QoS levels plus a possible sum value identified by the .sum suffix.
876 {"QF.EstabSuccNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL | SUM_LABEL, E2_NODE_LEVEL | UE_LEVEL},
877
878 // 5.1.1.13.3.3 Number of QoS flow failed to setup
879 // Description: This measurement provides the number of QoS flows failed to setup.
880 // Note: The nof measurements is equal to the nof causes plus a possible sum value identified by the .sum suffix.
881 // Note: mandatory Cause-label not supported in e2sm_kpm
882 {"QF.EstabFailNbr", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
883
884 // 5.1.1.13.3.4 Number of Initial QoS flow attempted to setup
885 // Description: This measurement provides the number of Initial QoS flows attempted to setup.
886 // Note: The nof measurements is equal to the nof QoS levels plus the number of S-NSSAIs, plus a possible sum value
887 // identified by the .sum suffix.
888 {"QF.InitialEstabAttNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL | SUM_LABEL, E2_NODE_LEVEL | UE_LEVEL},
889
890 // 5.1.1.13.3.5 Number of Initial QoS flow successfully established
891 // Description: This measurement provides the number of Initial QoS flows successfully established.
892 // Note: The number of measurements is equal to the number of QoS levels plus a possible sum
893 // value identified by the .sum suffix.
894 {"QF.InitialEstabSuccNbr", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL | SUM_LABEL, E2_NODE_LEVEL | UE_LEVEL},
895
896 // 5.1.1.13.3.6 Number of Initial QoS flow failed to setup
897 // Description: a) This measurement provides the number of Initial QoS flows failed to setup.
898 // Note: The nof measurements is equal to the nof causes plus a possible sum value identified by the .sum suffix.
899 // Note: mandatory Cause-label not supported in e2sm_kpm
900 {"QF.InitialEstabFailNbr", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
901
902 // 5.1.1.13.4 QoS flow modification
903 // 5.1.1.13.4.1 Number of QoS flows attempted to modify
904 // Description: This measurement provides the number of QoS flows attempted to modify.
905 {"QF.ModNbrAtt", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
906
907 // 5.1.1.13.4.2 Number of QoS flows successfully modified
908 // Description: This measurement provides the number of QoS flows successfully modified.
909 {"QF.ModNbrSucc", NRCellCU, CC, INTEGER, "-", FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
910
911 // 5.1.1.13.4.3 Number of QoS flows failed to modify
912 // Description: This measurement provides the number of QoS flows failed to modify.
913 // Note: mandatory Cause-label not supported in e2sm_kpm
914 {"QF.ModNbrFail", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
915
916 // 5.1.1.14 Void - empty in TS
917
918 // --------------------------------------------------------------------------------------------------------------- //
919 // 5.1.1.15 RRC connection establishment related measurements
920 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
921 // 5.1.1.15.1 Attempted RRC connection establishments
922 // Description: This measurement provides the nof RRC connection establishment attempts for each establishment cause.
923 // Note: mandatory Cause-label not supported in e2sm_kpm
924 {"RRC.ConnEstabAtt", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
925
926 // 5.1.1.15.2 Successful RRC connection establishments
927 // Description: This measurement provides the nof successful RRC establishments for each establishment cause.
928 // Note: mandatory Cause-label not supported in e2sm_kpm
929 {"RRC.ConnEstabSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
930
931 // 5.1.1.15.3 Failed RRC connection establishments
932 // Description: This measurement provides the nof failed RRC establishments, this measurmenet is split into
933 // subcounters per failure cause.
934 // Note: mandatory Cause-label not supported in e2sm_kpm
935 // Note: cause labels: RRC.ConnEstabFailCause.NetworkReject, RRC.ConnEstabFailCause.NoReply,
936 // RRC.ConnEstabFailCause.Other
937 {"RRC.ConnEstabFailCause", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
938
939 // --------------------------------------------------------------------------------------------------------------- //
940 // 5.1.1.16 UE-associated logical NG-connection related measurements
941 // 5.1.1.16.1 Attempted UE-associated logical NG-connection establishment from gNB to AMF
942 // Description: This measurement provides the number of attempted UE-associated logical NG-connection establishments
943 // from gNB to AMF, for each RRCSetupRequest establishment cause.
944 // Note: The number of measurements is equal to the number of establishment causes.
945 // Note: mandatory Cause-label not supported in e2sm_kpm
946 {"UECNTX.ConnEstabAtt", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
947
948 // 5.1.1.16.2 Successful UE-associated logical NG-connection establishment from gNB to AMF
949 // Description: This measurement provides the number of successful UE-associated logical NG-connection establishments
950 // from gNB to AMF, for each RRCSetupRequest establishment cause.
951 // Note: The number of measurements is equal to the number of establishment causes.
952 // Note: mandatory Cause-label not supported in e2sm_kpm
953 {"UECNTX.ConnEstabSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
954
955 // --------------------------------------------------------------------------------------------------------------- //
956 // 5.1.1.17 RRC Connection Re-establishment
957 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
958 // 5.1.1.17.1 Number of RRC connection re-establishment attempts
959 // Description: This measurement provides the number of RRC connection re-establishment attempts.
960 {"RRC.ReEstabAtt", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
961
962 // 5.1.1.17.2 Successful RRC connection re-establishment with UE context
963 // Description: This measurement provides the successful number of RRC connection re-establishment when UE context
964 // can be retrieved.
965 {"RRC.ReEstabSuccWithUeContext", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
966
967 // 5.1.1.17.3 Successful RRC connection re-establishment without UE context
968 // Description: This measurement provides the successful number of RRC connection re-establishment when UE context
969 // can not be retrieved.
970 {"RRC.ReEstabSuccWithoutUeContext", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
971
972 // 5.1.1.17.4 Number of RRC connection re-establishment attempts followed by RRC Setup
973 // Description: This measurement provides the number of RRC connection re-establishment attempts where no UE context
974 // could be retrieved and therefore fallback to RRC Setup procedure was attempted.
975 {"RRC.ReEstabFallbackToSetupAtt", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
976
977 // --------------------------------------------------------------------------------------------------------------- //
978 // 5.1.1.18 RRC Connection Resuming
979 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
980 // 5.1.1.18.1 Number of RRC connection resuming attempts
981 // Description: This measurement provides the number of RRC connection resuming attempts.
982 // Note: mandatory Cause-label not supported in e2sm_kpm
983 {"RRC.ResumeAtt", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
984
985 // 5.1.1.18.2 Successful RRC connection resuming
986 // Description: This measurement provides the total successful number of RRC connection resuming.
987 // Note: mandatory Cause-label not supported in e2sm_kpm
988 {"RRC.ResumeSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
989
990 // 5.1.1.18.3 Successful RRC connection resuming with fallback
991 // Description: This measurement provides the successful number of RRC connection resuming by fallback
992 // to RRC connection establishment.
993 // Note: mandatory Cause-label not supported in e2sm_kpm
994 {"RRC.ResumeSuccByFallback", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
995
996 // 5.1.1.18.4 RRC connection resuming followed by network release
997 // Description: This measurement provides the number of RRC connection resuming followed by network release.
998 {"RRC.ResumeFollowedbyNetworkRelease", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
999
1000 // 5.1.1.18.5 RRC connection resuming followed by network suspension
1001 // Description: This measurement provides the number of RRC connection resuming followed by network suspension.
1002 {"RRC.ResumeFollowedbySuspension", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1003
1004 // 5.1.1.18.6 Number of RRC connection resuming attempts followed by RRC Setup
1005 // Description: This measurement provides the number of RRC connection resuming attempts where no UE context
1006 // could be retrieved and therefore fallback to RRC Setup procedure was attempted.
1007 // Note: mandatory Cause-label not supported in e2sm_kpm
1008 {"RRC.ResumeFallbackToSetupAtt", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1009
1010 // --------------------------------------------------------------------------------------------------------------- //
1011 // 5.1.1.19 Power, Energy and Environmental (PEE) measurements
1012 // 5.1.1.19.1 Applicability of measurements -> no metric here
1013
1014 // 5.1.1.19.2 PNF Power Consumption
1015 // 5.1.1.19.2.1 Average Power
1016 // Description: This measurement provides the average power consumed over the measurement period.
1017 {"PEE.AvgPower", E2_Node, SI, REAL, "W", NO_LABEL, E2_NODE_LEVEL},
1018
1019 // 5.1.119.2.2 Minimum Power
1020 // Description: This measurement provides the minimum power consumed during the measurement period
1021 {"PEE.MinPower", E2_Node, SI, REAL, "W", NO_LABEL, E2_NODE_LEVEL},
1022
1023 // 5.1.1.19.2.3 Maximum Power
1024 // Description: This measurement provides the maximum power consumed during the measurement period.
1025 {"PEE.MaxPower", E2_Node, SI, REAL, "W", NO_LABEL, E2_NODE_LEVEL},
1026
1027 // 5.1.1.19.3 PNF Energy consumption
1028 // Description: This measurement provides the energy consumed.
1029 {"PEE.Energy", E2_Node, SI, REAL, "kWh", NO_LABEL, E2_NODE_LEVEL},
1030
1031 // 5.1.1.19.4 PNF Temperature
1032 // 5.1.1.19.4.1 Average Temperature
1033 // Description: This measurement provides the average temperature over the measurement period.
1034 {"PEE.AvgTemperature", E2_Node, SI, REAL, "C", NO_LABEL, E2_NODE_LEVEL},
1035
1036 // 5.1.1.19.4.2 Minimum Temperature
1037 // Description: This measurement provides the minimum temperature during the measurement period.
1038 {"PEE.MinTemperature", E2_Node, SI, REAL, "C", NO_LABEL, E2_NODE_LEVEL},
1039
1040 // 5.1.1.19.4.3 Maximum Temperature
1041 // Description: This measurement provides the maximum temperature during the measurement period.
1042 {"PEE.MaxTemperature", E2_Node, SI, REAL, "C", NO_LABEL, E2_NODE_LEVEL},
1043
1044 // 5.1.1.19.5 PNF Voltage
1045 // Description: This measurement provides the voltage.
1046 {"PEE.Voltage", E2_Node, SI, REAL, "V", NO_LABEL, E2_NODE_LEVEL},
1047
1048 // 5.1.1.19.6 PNF Current
1049 // Description: This measurement provides the current.
1050 {"PEE.Current", E2_Node, SI, REAL, "A", NO_LABEL, E2_NODE_LEVEL},
1051
1052 // 5.1.1.19.7 PNF Humidity
1053 // Description: This measurement provides the percentage of humidity during the measurement period
1054 {"PEE.Humidity", E2_Node, SI, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL},
1055
1056 // --------------------------------------------------------------------------------------------------------------- //
1057 // 5.1.1.20 Received Random Access Preambles
1058 // 5.1.1.20.1 Received Random Access Preambles per cell
1059 // Description: This measurement provides the average (arithmetic mean) number of RACH preambles received in a cell.
1060 // Note: The number of measurements is equal to three.
1061 {"RACH.PreambleDedCell", NRCellDU, DER, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1062 {"RACH.PreambleACell", NRCellDU, DER, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1063 {"RACH.PreambleBCell", NRCellDU, DER, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1064
1065 // 5.1.1.20.2 Received Random Access Preambles per SSB
1066 // Description: This measurement provides the average number of RACH preambles received in a cell per SSB.
1067 // Note: The number of measurements is equal to three times the number of SSB beams defined in the cell.
1068 {"RACH.PreambleDed", NRCellDU, DER, INTEGER, "-", SSB_IDX_LABEL, E2_NODE_LEVEL},
1069 {"RACH.PreambleA", NRCellDU, DER, INTEGER, "-", SSB_IDX_LABEL, E2_NODE_LEVEL},
1070 {"RACH.PreambleB", NRCellDU, DER, INTEGER, "-", SSB_IDX_LABEL, E2_NODE_LEVEL},
1071
1072 // 5.1.1.20.3 Distribution of number of RACH preambles per cell
1073 // Description: This measurement provides the distribution of the number of RACH preambles sent by the UE when
1074 // successfully accessing the network, as reported by the UEs inside the RA-ReportList-r16 IE
1075 // in the UEInformationResponse-r16 message.
1076 // Note: RACH.PreambleDist.Bin where Bin is to identify the bins associated with the number of preambles sent.
1077 {"RACH.PreambleDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1078
1079 // 5.1.1.20.4 Distribution of RACH access delay
1080 // Description: This measurement provides an estimate of the distribution of the RACH access delay, that is the
1081 // interval from the time a UE sends its first RACH preamble until the UE is connected to the network.
1082 // Note: RACH.AccessDelayDist.Bin where Bin is to identify the bins associated with the RACH access delay.
1083 {"RACH.AccessDelayDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1084
1085 // --------------------------------------------------------------------------------------------------------------- //
1086 // 5.1.1.21 Intra-NRCell SSB Beam switch Measurement
1087 // 5.1.1.21.1 Number of requested Intra-NRCell SSB Beam switch executions
1088 // Description: This measurement provides the number of outgoing intra-NRCell SSB Beam switch executions requested
1089 // by the source SSB Beam in an NRCell in case the beam switch function is enabled (see TS 38.331[20]).
1090 {"MR.IntraCellSSBSwitchReq", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1091
1092 // 5.1.1.21.2 Number of successful Intra-NRCell SSB Beam switch executions
1093 // Description: This measurement provides the number of successful intra-NRcell SSB Beam switch executions received
1094 // by the source SSB Beam in case the beam switch function is enabled (see TS 38.331[20]).
1095 {"MR.IntrCellSuccSSBSwitch", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1096
1097 // --------------------------------------------------------------------------------------------------------------- //
1098 // 5.1.1.22 RSRP Measurement
1099 // 5.1.1.22.1 SS-RSRP distribution per SSB
1100 // Description: This measurement provides the distribution of SS-RSRP per SSB (see TS 38.215 [34]) received by gNB
1101 // from UEs in the cell when SS-RSRP is used for L1-RSRP as configured by reporting configurations
1102 // as defined in TS 38.214 [33], in case the L1-RSRP report function is enabled.
1103 // Note: L1M.SS-RSRP.Bin, where Bin represents the range of reported SS-RSRP value (0 to 127 dBm)
1104 // Note: Number of bins and the range for each bin is left to implementation.
1105 {"L1M.SS-RSRP", BEAM, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1106
1107 // 5.1.1.22.2 SS-RSRP distribution per SSB of neighbor NR cell
1108 // Description: This measurement provides the distribution of SS-RSRP per SSB (see TS 38.215 [34]) of a neighbour
1109 // NR cell received by gNB from UEs when SS-RSRP is used for L1-RSRP as configured by reporting
1110 // configurations as defined in TS 38.214 [33], in case the L1-RSRP report function is enabled.
1111 // Note: L1M.SS-RSRPNrNbr.SSBIndex.Bin where SSBIndex identifies the SSB beam of the neighbor NR cell; and
1112 // the Bin represents the range of reported SS-RSRP value (0 to 127).
1113 {"L1M.SS-RSRPNrNbr", NRCellCU | NRCellRelation, CC, INTEGER, "-", SSB_IDX_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1114
1115 // 5.1.1.22.3 RSRP distribution per neighbor E-UTRAN cell
1116 // Description: This measurement provides the distribution of RSRP per neighbour E-UTRA cell received by gNB from UEs.
1117 // Note: L1M.RSRPEutraNbr.Bin, where the Bin represents the range of reported RSRP value to 97).
1118 // Note: Number of bins and the range for each bin is left to implementation.
1119 {"L1M.RSRPEutraNbr", NRCellCU | EutranRelation, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1120
1121 // 5.1.1.22.4 SRS-RSRP measurement
1122 // Description: This measurement provides the distribution of SRS-RSRP received by gNB from UEs in the cell.
1123 // Note: MR.NRScSRSRSRP.Bin, where a Bin represents a range from the measured SRS-RSRP value (-140 to -44 dBm)
1124 // Note: Number of bins and the range for each bin is left to implementation.
1125 {"MR.NRScSRSRSRP", NRCellCU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1126
1127 // 5.1.1.23 Number of Active Ues
1128 // Note: Measurement definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE and UE levels.
1129 // 5.1.1.23.1 Mean number of Active UEs in the DL per cell
1130 // Description: This measurement provides the mean number of active DRBs for UEs in an NRCellDU.
1131 // Note: why INTEGER if mean value?
1132 {"DRB.MeanActiveUeDl", NRCellDU, DER, INTEGER, "-", PLMN_ID_LABEL | SLICE_ID_LABEL | FIVE_QI_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1133
1134 // 5.1.1.23.2 Max number of Active UEs in the DL per cell
1135 // Description: This measurement provides the max number of active DRBs for UEs in an NRCellDU.
1136 // Note: type not specified in TS
1137 {"DRB.MaxActiveUeDl", NRCellDU, DER, INTEGER, "-", PLMN_ID_LABEL | SLICE_ID_LABEL | FIVE_QI_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1138
1139 // 5.1.1.23.3 Mean number of Active UEs in the UL per cell
1140 // Description: This measurement provides the mean number of active DRBs for UEs in an NRCellDU.
1141 // Note: why INTEGER if mean value?
1142 {"DRB.MeanActiveUeUl", NRCellDU, DER, INTEGER, "-", PLMN_ID_LABEL | SLICE_ID_LABEL | FIVE_QI_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1143
1144 // 5.1.1.23.4 Max number of Active UEs in the UL per cell
1145 // Description: This measurement provides the max number of active DRBs for UEs in an NRCellDU.
1146 // Note: type not specified in TS
1147 {"DRB.MaxActiveUeUl", NRCellDU, DER, INTEGER, "-", PLMN_ID_LABEL | SLICE_ID_LABEL | FIVE_QI_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1148
1149 // --------------------------------------------------------------------------------------------------------------- //
1150 // 5.1.1.24 5QI 1 QoS Flow Duration Monitoring
1151 // Note: Definitions were changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE_LEVEL and UE_LEVEL
1152 // 5.1.1.24.1 Average Normally Released Call (5QI 1 QoS Flow) Duration
1153 // Description: This measurement provides the average value of normally released call (5QI 1 QoS Flow) duration.
1154 // Note: why INTEGER is mean value?
1155 {"5QI1QoSflow.Rel.Average.NormCallDuration", NRCellCU, CC, INTEGER, "ms", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1156
1157 // 5.1.1.24.2 Average Abnormally Released Call (5QI 1 QoS Flow) Duration
1158 // Description: This measurement provides the average value of abnormally released call (5QI 1 QoS Flow) duration.
1159 // Note: why INTEGER is mean value?
1160 {"5QI1QoSflow.Rel.Average.AbnormCallDuration", NRCellCU, CC, INTEGER, "ms", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1161
1162 // 5.1.1.24.3 Distribution of Normally Released Call (5QI 1 QoS Flow) Duration
1163 // Description: This measurement provides the histogram result of the samples related to normally released call
1164 // (5QI 1 QoS Flow) duration collected during measurement period duration.
1165 // Note: 5QI1QoSflow.Rel.NormCallDurationBinX where X denotes the X-th bin from total number of N configured bins.
1166 // X-th bin stands for the normal call duration which is within the range from t{x-1} to t{x}.
1167 {"5QI1QoSflow.Rel.NormCallDuration", NRCellCU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1168
1169 // 5.1.1.24.4 Distribution of Abnormally Released Call (5QI 1 QoS Flow) Duration
1170 // Description: This measurement provides the histogram result of the samples related to abnormally released call
1171 // (5QI 1 QoS Flow) duration collected during measurement period duration.
1172 // Note: 5QI1QoSflow.Rel.AbnormCallDurationBinX where X denotes the X-th bin from total number of N configured bins.
1173 // X-th bin stands for the abnormal call duration which is within the range from t{x-1} to t{x}.
1174 {"5QI1QoSflow.Rel.AbnormCallDuration", NRCellCU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1175
1176 // --------------------------------------------------------------------------------------------------------------- //
1177 // 5.1.1.25 Measurements related to MRO
1178 // 5.1.1.25.1 Handover failures related to MRO for intra-system mobility
1179 // Description: This measurement provides the number of handover failure events related to MRO detected
1180 // during the intra-system mobility within 5GS, see TS 38.300 [49] clause 15.5.2.
1181 // Note: mandatory Cause-label not supported in e2sm_kpm
1182 // Note: available cause labels: HO.IntraSys.TooEarly, HO.IntraSys.TooLate, HO.IntraSys.ToWrongCell
1183 {"HO.IntraSys.TooEarly", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1184 {"HO.IntraSys.TooLate", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1185 {"HO.IntraSys.ToWrongCell", NRCellCU | NRCellRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1186
1187 // 5.1.1.25.2 Handover failures related to MRO for inter-system mobility
1188 // Description: This measurement provides the number of handover failure events delated to MRO detected
1189 // during the inter-system mobility between NG-RAN and E-UTRAN, limited to the scenarios defined
1190 // in TS 38.300 [49] clause 15.5.2.2.3.
1191 // Note: mandatory Cause-label not supported in e2sm_kpm
1192 // Note: available cause labels: HO.InterSys.TooEarly, HO.InterSys.TooLate
1193 {"HO.InterSys.TooEarly", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1194 {"HO.InterSys.TooLate", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1195
1196 // 5.1.1.25.3 Unnecessary handovers for inter-system mobility
1197 // Description: This measurement provides the number of unnecessary handover events detected during
1198 // the inter-system mobility from NG-RAN to E-UTRAN, see TS 38.300 [49] clause 15.5.2.3.
1199 {"HO.InterSys.Unnecessary", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1200
1201 // 5.1.1.25.4 Handover ping-pong for inter-system mobility
1202 // Description: This measurement provides the number of handover ping-pong events detected during
1203 // the inter-system mobility between NG-RAN and E-UTRAN, see TS 38.300 [49] clause 15.5.2.4.
1204 {"HO.InterSys.PingPong", NRCellCU | EutranRelation, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1205
1206 // 5.1.1.25.5 Handover failures per beam-cell pair related to MRO for intra-system mobility
1207 // Description: This measurement provides the number of handover failure events per beam-cell pair
1208 // (source beam, i.e., the last beam before failure, and target cell) related to MRO
1209 // detected during the intra-system mobility within 5GS.
1210 // Note: NR Cell Identity (NCI) label (filter) not available, but cell_scope
1211 {"HO.IntraSys.bTooEarly.NCI", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1212 {"HO.IntraSys.bTooLate.NCI", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1213 {"HO.IntraSys.bToWrongCell.NCI", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1214
1215 // 5.1.1.25.6 Handover failures per beam-cell pair related to MRO for inter-system mobility
1216 // Description: This measurement provides the number of handover failure events per beam-cell pair
1217 // (source beam, i.e., the last beam before failure, and target cell) related to MRO
1218 // detected during the inter-system mobility from 5GS to EPS.
1219 // Note: E-UTRAN Cell Global Identifier (ECGI) label (filter) not available, but cell_scope
1220 {"HO.InterSys.bTooLate.ECGI", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1221
1222 // 5.1.1.25.7 Unnecessary handovers per beam-cell pair for inter-system mobility
1223 // Description: This measurement provides the number of unnecessary handover events per beam-cell pair
1224 // (source beam, i.e., the last beam before handover, and target cell) detected during
1225 // the inter-system mobility from 5GS to EPS.
1226 // Note: E-UTRAN Cell Global Identifier (ECGI) label (filter) not available, but cell_scope
1227 {"HO.InterSys.bUnnecessary.ECGI", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1228
1229 // 5.1.1.25.8 Handover ping-pong per beam-cell pair for inter-system mobility
1230 // Description: This measurement provides the number of handover ping-pong events per beam-cell pair
1231 // (source beam, i.e., the last beam before failure, and target cell) detected during
1232 // the inter-system mobility from 5GS to EPS.
1233 // Note: NR Cell Identity (NCI) label (filter) not available, but cell_scope
1234 {"HO.InterSys.bPingPong.NCI", BEAM, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1235
1236 // --------------------------------------------------------------------------------------------------------------- //
1237 // 5.1.1.26 PHR Measurement
1238 // 5.1.1.26.1 Type 1 power headroom distribution
1239 // Description: This measurement provides a bin distribution (histogram) of Type 1 power headroom measurements.
1240 // Note: L1M.PHR1.BinX, where X represents the range of PHR value (-32 ...+38 dB) (See in TS 38.133 [32])
1241 // Note: Number of bins and the range for each bin is left to implementation.
1242 {"L1M.PHR1", NRCellDU , CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1243
1244 // --------------------------------------------------------------------------------------------------------------- //
1245 // 5.1.1.27 Paging Measurement
1246 // 5.1.1.27.1 Number of CN Initiated paging records received by the gNB-CU
1247 // Description: This measurement provides number of CN Initiated paging records received by the gNB-CU.
1248 {"PAG.ReceivedNbrCnInitiated", GNBCUUP, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1249
1250 // 5.1.1.27.2 Number of NG-RAN Initiated paging records received by the gNB-CU
1251 // Description: This measurement provides numbe of NR RAN Initiated paging records received by the gNB-CU.
1252 {"PAG.ReceivedNbrRanIntiated", GNBCUUP, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1253
1254 // 5.1.1.27.3 Number of paging records received by the NRCellDU
1255 // Description: This measurement provides number of paging records received by gNB-DU which shall perform paging
1256 // of the UE in cells which belong to cells as indicated in the Paging Cell List IE.
1257 {"PAG.ReceivedNbr", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1258
1259 // 5.1.1.27.4 Number of CN Initiated paging records discarded at the gNB-CU
1260 // Description: This measurement provides number of CN Initiated paging records discarded at the gNB-CU.
1261 {"PAG.DiscardedNbrCnInitiated", GNBCUUP, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1262
1263 // 5.1.1.27.5 Number of NG-RAN Initiated paging records discarded at the gNB-CU
1264 // Description: This measurement provides number of NG-RAN Initiated paging records discarded at the gNB-CU.
1265 {"PAG.DiscardedNbrRanInitiated", GNBCUUP, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1266
1267 // 5.1.1.27.6 Number of paging records discarded at the NRCellDU
1268 // Description: This measurement provides number of paging records discarded at gNB-DU in cells
1269 // as indicated in the Paging Cell List IE.
1270 {"PAG.DiscardedNbr", NRCellDU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1271
1272 // --------------------------------------------------------------------------------------------------------------- //
1273 // 5.1.1.28 SSB beam related Measurement
1274 // 5.1.1.28.1 Number of UE related the SSB beam Index (mean)
1275 // Description: This measurement provides number of UE related the SSB beam index.
1276 {"L1M.SSBBeamRelatedUeNbr", BEAM, CC, INTEGER, "-", SSB_IDX_LABEL, E2_NODE_LEVEL},
1277
1278 // --------------------------------------------------------------------------------------------------------------- //
1279 // 5.1.1.29 Transmit power utilization measurements
1280 // 5.1.1.29.1 Maximum transmit power of NR cell
1281 // Description: This measurement provides the maximum carrier transmit power in the measurement granularity interval.
1282 {"CARR.MaxTxPwr", NRCellDU, SI, REAL, "dBm", NO_LABEL, E2_NODE_LEVEL},
1283
1284 // 5.1.1.29.2 Mean transmit power of NR cell
1285 // Description: This measurement provides the mean carrier transmit power in the measurement granularity interval.
1286 {"CARR.NRCellDU", NRCellDU, SI, REAL, "dBm", NO_LABEL, E2_NODE_LEVEL},
1287
1288 // --------------------------------------------------------------------------------------------------------------- //
1289 // 5.1.1.30 MU-MIMO related measurements
1290 // 5.1.1.30.1 Scheduled PDSCH RBs per layer of MU-MIMO
1291 // Description: This measurement provides the distribution of the scheduled PDSCH RBs
1292 // per MU-MIMO layer by NG-RAN in MU-MIMO scenario.
1293 // Note: CARR.MUPDSCHRB.BINX, where X represents the MU-MIMO layer value (2 to n).
1294 // Note: why not LAYER_MU_MIMO_LABEL?
1295 {"CARR.MUPDSCHRB", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1296
1297 // 5.1.1.30.2 Scheduled PUSCH RBs per layer of MU-MIMO
1298 // Description: This measurement provides the distribution of the scheduled PUSCH RBs
1299 // per MU-MIMO layer by NG-RAN in MU-MIMO scenario.
1300 // Note: CARR.MUPUSCHRB.BINX, where X represents the MU-MIMO layer value (2 to n).
1301 // Note: why not LAYER_MU_MIMO_LABEL?
1302 {"CARR.MUPUSCHRB", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1303
1304 // 5.1.1.30.3 PDSCH Time-domain average Maximum Scheduled Layer Number of cell for MIMO scenario
1305 // Description: This measurement provides the Time-domain average maximum scheduled layer number
1306 // for PDSCH under MIMO scenario in the downlink.
1307 {"RRU.MaxLayerDlMimo", NRCellDU, SI, REAL, "-", NO_LABEL, E2_NODE_LEVEL},
1308
1309 // 5.1.1.30.4 PUSCH Time-domain average Maximum Scheduled Layer Number of cell for MIMO scenario
1310 // Description: This measurement provides the Time-domain average maximum scheduled layer number
1311 // for PUSCH under MIMO scenario in the uplink.
1312 {"RRU.MaxLayerUlMimo", NRCellDU, SI, REAL, "-", NO_LABEL, E2_NODE_LEVEL},
1313
1314 // 5.1.1.30.5 Average value of scheduled MIMO layers per PRB on the DL
1315 // Description: This measurement provides the average value of allocated MIMO layers on the downlink
1316 // per PRB per cell, for MIMO scenario within the measurement period.
1317 {"CARR.AverageLayersDl", NRCellDU, SI, REAL, "-", NO_LABEL, E2_NODE_LEVEL},
1318
1319 // 5.1.1.30.6 Average value of scheduled MIMO layers per PRB on the UL
1320 // Description: This measurement provides the average value of allocated MIMO layers on the uplink per PRB per cell,
1321 // for MIMO scenario within the measurement period.
1322 {"CARR.AverageLayersUl", NRCellDU, SI, REAL, "-", NO_LABEL, E2_NODE_LEVEL},
1323
1324 // 5.1.1.30.7 Available MIMO Layers Coverage Map per UE and per PRB on the DL
1325 // Description: This measurement provides the sub-cell radius within the observed cell up to where a UE
1326 // with the given number of MIMO layers in DL per PRB can be localized.
1327 // Note: MIMOLayersDLy where y ranges from 1 to maximum possible MIMO layers that can be assigned per UE and PRB in DL
1328 // Note: wrong name format in TS?
1329 // Note: meter label (filter) not available in e2sm_kpm
1330 {"MIMOLayersDLy", NRCellDU, SI, REAL, "m", NO_LABEL, E2_NODE_LEVEL},
1331
1332 // 5.1.1.30.8 Available MIMO Layers Coverage Map per UE and per PRB on the UL
1333 // Description: This measurement provides the sub-cell radius within the observed cell up to
1334 // where an UE with the given number of MIMO layers in UL per PRB can be localized.
1335 // Note: MIMOLayersULy where y ranges from 1 to maximum possible MIMO layers that can be assigned per UE and PRB in UL
1336 // Note: wrong name format in TS?
1337 // Note: meter label (filter) not available in e2sm_kpm
1338 {"MIMOLayersULy", NRCellDU, SI, REAL, "m", NO_LABEL, E2_NODE_LEVEL},
1339
1340 // 5.1.1.30.9 Distribution of Scheduled PDSCH PRBs based on MIMO Layers Coverage Map in DL
1341 // Description: This measurement provides Distribution of Scheduled PDSCH PRBs based on MIMO Layers Coverage Map
1342 // per UE and per PRB on the DL.
1343 // Note: PDSCHPRBsLayer.BINy where y represents the number of layers that can be assigned per PRB on PDSCH to the UE
1344 // on the distance from base station within the following interval: (MIMOLayersDL(y-1), MIMOLayersDLy>,
1345 // where MIMOLayersDLy represents measurement defined in the clause 5.1.1.30.7
1346 {"PDSCHPRBsLayer", NRCellDU, SI, REAL, "-", DIST_BIN_Y_LABEL, E2_NODE_LEVEL},
1347
1348 // 5.1.1.30.10 Distribution of Scheduled PUSCH PRBs based on MIMO Layers Coverage Map in UL
1349 // Description: This measurement provides Distribution of Scheduled PUSCH PRBs based on MIMO Layers Coverage Map
1350 // per UE and per PRB on the UL.
1351 // Note: PUSCHPRBsLayer.BINy where y represents the number of layers that can be assigned per PRB on PUSCH to the UE
1352 // on the distance from base station within the following interval: (MIMOLayersUL(y-1), MIMOLayersULy>,
1353 // where MIMOLayersULy represents measurement defined in the clause 5.1.1.30.8
1354 {"PUSCHPRBsLayer", NRCellDU, SI, REAL, "-", DIST_BIN_Y_LABEL, E2_NODE_LEVEL},
1355
1356 // --------------------------------------------------------------------------------------------------------------- //
1357 // 5.1.1.31 RSRQ measurement
1358 // 5.1.1.31.1 SS-RSRQ distribution in gNB
1359 // Description: This measurement provides the distribution of SS-RSRQ received by gNB from UEs in the cell.
1360 // Note: MR.NRScSSRSRQ.BinX, where X represents the range of Measured quantity SS-RSRQ value (-43 to 20 dB)
1361 // Note: Number of bins and the range for each bin is left to implementation.
1362 {"MR.NRScSSRSRQ", NRCellCU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1363
1364 // 5.1.1.31.2 SS-RSRQ distribution per SSB
1365 // Description: This measurement provides the distribution of SS-RSRQ per SSB received by the gNB of a serving cell
1366 // from UEs in the measResults IEs in MeasurementReport messages that is triggered by the gNB sending
1367 // the measConfig messages to request UEs to send the UE measurement reports.
1368 // Note: MR.SS-RSRQPerSSB.Bin, where Bin represents the range of reported SS-RSRQ value (0 .. 127)
1369 // mapping to -43 dB to 20 dB with 0.5 dB resolution (See Table 10.1.11.1-1 in TS 38.133 [35]).
1370 // Note: Number of bins and the range for each bin is left to implementation.
1371 {"MR.SS-RSRQPerSSB", BEAM, CC, INTEGER, "-", SSB_IDX_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1372
1373 // 5.1.1.31.3 SS-RSRQ distribution per SSB of neighbor NR cell
1374 // Description: This measurement provides the distribution of SS-RSRQ per SSB received by the gNB of a neighbour cell
1375 // from UEs in the measResults IEs in MeasurementReport messages that is triggered by the gNB sending
1376 // the measConfig messages to request UEs to send the UE measurement reports.
1377 // Note: MR.SS-RSRQ.SSBIndex.Bin, where SSBIndex identifies the SSB beam of the neighbor NR cell. Bin represents
1378 // the range of reported SS-RSRQ value (0 .. 127) mapping to -43 dB to 20 dB with 0.5 dB resolution
1379 // Note: Number of bins and the range for each bin is left to implementation.
1380 {"MR.SS-RSRQ", NRCellCU | NRCellRelation, CC, INTEGER, "-", SSB_IDX_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1381
1382 // --------------------------------------------------------------------------------------------------------------- //
1383 // 5.1.1.32 SINR measurement
1384 // 5.1.1.32.1 SS-SINR distribution in gNB
1385 // Description: This measurement provides the distribution of SS-SINR received by gNB from UEs in the cell.
1386 // Note: MR.NRScSSSINR.BinX, where X represents the range of Measured quantity SS-SINR value (-23 to 40 dB)
1387 // Note: Number of bins and the range for each bin is left to implementation.
1388 {"MR.NRScSSSINR", NRCellCU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1389
1390 // 5.1.1.32.2 SS-SINR distribution per SSB
1391 // Description: This measurement provides the distribution of SS-SINR per SSB received by the gNB of a serving cell
1392 // from UEs in the measResults IEs in MeasurementReport messages that is triggered by the gNB sending
1393 // the measConfig messages to request UEs to send the UE measurement reports.
1394 // Note: MR.SS-SINRPerSSB.Bin, where Bin represents the range of reported SS-SINR value (0 .. 127) mapping
1395 // to -23 dB to 40 dB with 0.5 dB resolution (See Table 10.1.16.1-1 in TS 38.133 [35]).
1396 // Note: Number of bins and the range for each bin is left to implementation.
1397 {"MR.SS-SINRPerSSB", BEAM, CC, INTEGER, "-", SSB_IDX_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1398
1399 // 5.1.1.32.3 SS-SINR distribution per SSB of neighbor NR cell
1400 // Description: This measurement provides the distribution of SS-SINR per SSB received by the gNB of a neighbour cell
1401 // from UEs in the measResults IEs in MeasurementReport messages that is triggered by the gNB sending
1402 // the measConfig messages to request UEs to send the UE measurement reports.
1403 // Note: MR.SS-SINR.SSBIndex.Bin, where SSBIndex identifies the SSB beam of the neighbor NR cell. Bin represents
1404 // the range of reported SS-RSRQ value (0 .. 127) mapping to -23 dB to 40 dB with 0.5 dB resolution.
1405 // Note: Number of bins and the range for each bin is left to implementation.
1406 {"MR.SS-SINR", NRCellCU | NRCellRelation, CC, INTEGER, "-", SSB_IDX_LABEL | DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1407
1408 // --------------------------------------------------------------------------------------------------------------- //
1409 // 5.1.1.33 Timing Advance
1410 // 5.1.1.33.1 Timing Advance distribution for NR Cell
1411 // Description: This measurement provides the distribution of the Absolute Timing Advance (TA) values transmitted
1412 // by the gNB to UEs in the cell.
1413 // Note: L1M.ATADist.Bin, where Bin represents the range of absolute TA value (0 to 4095).
1414 // Note: Number of bins and the range for each bin is left to implementation.
1415 {"L1M.ATADist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL, E2_NODE_LEVEL},
1416
1417 // --------------------------------------------------------------------------------------------------------------- //
1418 // 5.1.1.34 Incoming GTP Data Packet Loss in gNB over N3
1419 // Description: This measurement provides the number of GTP data packets which are not successfully received
1420 // at gNB over N3 after being sent by UPF.
1421 // Note: source is EP_NgU (contained by GNBCUUPFunction)
1422 {"GTP.InDataPktPacketLossN3gNB", GNBCUUP, CC, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL},
1423
1424 // --------------------------------------------------------------------------------------------------------------- //
1425 // 5.1.1.35 DL Packet Loss rate on Uu
1426 // Description: This measurement provides the DL Packet (i.e., RLC SDU) Loss rate on Uu interface for an NR cell.
1427 // Note: Measurement definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE and UE levels.
1428 {"DRB.PacketLossRateUu", NRCellDU, CC, INTEGER, "-", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1429
1430 // --------------------------------------------------------------------------------------------------------------- //
1431 // 5.1.2 Performance measurements valid only for non-split gNB deployment scenario
1432 // 5.1.2.1 PDCP Data Volume
1433 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1434 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1435 // 5.1.2.1.1 DL PDCP SDU Data Volume Measurements
1436 // 5.1.2.1.1.1 DL Cell PDCP SDU Data Volume
1437 // Description: This measurement provides the Data Volume (PDCP SDU bits) in the downlink delivered to PDCP layer.
1438 {"DRB.PdcpSduVolumeDL", NRCellCU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1439
1440 // 5.1.2.1.1.2 DL Cell PDCP SDU Data Volume on X2 Interface
1441 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the downlink
1442 // delivered on X2 interface in DC-scenarios.
1443 {"DRB.PdcpSduVolumeX2DL", NRCellCU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1444
1445 // 5.1.2.1.1.3 DL Cell PDCP SDU Data Volume on Xn Interface
1446 // Description: This measurement provides the Data Volume (PDCP SDU bits) in the downlink delivered on Xn interface.
1447 {"DRB.PdcpSduVolumeXnDL", NRCellCU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1448
1449 // 5.1.2.1.2 UL PDCP SDU Data Volume Measurements
1450 // 5.1.2.1.2.1 UL Cell PDCP SDU Data Volume
1451 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the uplink delivered
1452 // from PDCP layer to higher layers.
1453 {"DRB.PdcpSduVolumeUL", NRCellCU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1454
1455 // 5.1.2.1.2.2 UL Cell PDCP SDU Data Volume on X2 Interface
1456 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the uplink delivered
1457 // on X2 interface in NSA scenarios.
1458 {"DRB.PdcpSduVolumeX2UL", NRCellCU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1459
1460 // 5.1.2.1.2.3 UL Cell PDCP SDU Data Volume on Xn Interface
1461 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the uplink delivered
1462 // on Xn interface in SA scenarios.
1463 {"DRB.PdcpSduVolumeXnUL", NRCellCU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1464
1465 // --------------------------------------------------------------------------------------------------------------- //
1466 // 5.1.2.2 Packet Success Rate
1467 // 5.1.2.2.1 UL PDCP SDU Success Rate
1468 // Description: This measurement provides the fraction of PDCP SDU packets which are successfully received at gNB.
1469 // Note: Measurement definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE and UE levels.
1470 {"DRB.PacketSuccessRateUlgNBUu", NRCellCU, SI, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1471
1472 // --------------------------------------------------------------------------------------------------------------- //
1473 // 5.1.2.3 QoS flow release
1474 // 5.1.2.3.1 Mean interruption time interval for 5QI 1 QoS Flow released due to double NG (double UE context)
1475 // Description: This measurement provides the average interruption time interval for 5QI 1 QoS Flow released
1476 // due to double NG (double UE context).
1477 // Note: no family prefix in TS
1478 {"MeanTime5QI1Flow.RelDoubleNG", NRCellCU, CC, INTEGER, "ms", NO_LABEL, E2_NODE_LEVEL},
1479
1480 // --------------------------------------------------------------------------------------------------------------- //
1481 // 5.1.3 Performance measurements valid for split gNB deployment scenario
1482 // 5.1.3.1 Packet Loss Rate
1483 // Note: Measurement definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable E2_NODE and UE levels.
1484 // 5.1.3.1.1 UL PDCP SDU Loss Rate
1485 // Description: This measurement provides the fraction of PDCP SDU packets which are not successfully received
1486 // at gNB-CU-UP.
1487 // Note: integer value representing the loss rate multiplied by 1e6
1488 {"DRB.PacketLossRateUl", NRCellCU | GNBCUUP, SI, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1489
1490 // 5.1.3.1.2 UL F1-U Packet Loss Rate
1491 // Description: This measurement provides the fraction of PDCP SDU packets which are not successfully received
1492 // at gNB-CU-UP.
1493 // Note: integer value representing the loss rate multiplied by 1e6
1494 {"DRB.F1UpacketLossRateUl", GNBCUUP, SI, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1495
1496 // 5.1.3.1.3 DL F1-U Packet Loss Rate
1497 // Description: This measurement provides the fraction of PDCP SDU packets which are not successfully received
1498 // at the gNB-DU).
1499 // Note: integer value representing the loss rate multiplied by 1e6
1500 {"DRB.F1UpacketLossRateDl", NRCellDU, SI, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1501
1502 // --------------------------------------------------------------------------------------------------------------- //
1503 // 5.1.3.2 Packet Drop Rate
1504 // 5.1.3.2.1 DL PDCP SDU Drop rate in gNB-CU-UP
1505 // Description: This measurement provides the fraction of PDCP SDU packets which are dropped on the downlink,
1506 // due to high traffic load, traffic management etc in the gNB-CU-UP.
1507 // Note: integer value representing the loss rate multiplied by 1e6
1508 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1509 {"DRB.PdcpPacketDropRateDl", NRCellCU | GNBCUUP, SI, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1510
1511 // 5.1.3.2.2 DL Packet Drop Rate in gNB-DU
1512 // Description: This measurement provides the fraction of RLC SDU packets which are dropped on the downlink,
1513 // due to high traffic load, traffic management etc in the gNB-DU.
1514 // Note: integer value representing the loss rate multiplied by 1e6
1515 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1516 {"DRB.RlcPacketDropRateDl", NRCellDU, SI, INTEGER, "-", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1517
1518 // --------------------------------------------------------------------------------------------------------------- //
1519 // 5.1.3.3 Packet delay
1520 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1521 // 5.1.3.3.1 Average delay DL in CU-UP
1522 // Description: This measurement provides the average (arithmetic mean) PDCP SDU delay on the downlink within
1523 // the gNB-CU-UP, for all PDCP packets.
1524 {"DRB.PdcpSduDelayDl", GNBCUUP, DER, REAL, "0.1ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1525
1526 // 5.1.3.3.2 Average delay DL on F1-U
1527 // Description: This measurement provides the average (arithmetic mean) GTP packet delay DL on the F1-U interface.
1528 {"DRB.PdcpF1DelayDl", GNBCUUP, DER, REAL, "0.1ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1529
1530 // 5.1.3.3.3 Average delay DL in gNB-DU
1531 // Description: This measurement provides the average (arithmetic mean) RLC SDU delay on the downlink within
1532 // the gNB-DU, for initial transmission of all RLC packets.
1533 {"DRB.RlcSduDelayDl", NRCellDU, DER, REAL, "0.1ms", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1534
1535 // 5.1.3.3.4 Distribution of delay DL in CU-UP
1536 // Description: This measurement provides the distribution of PDCP SDU delay on the downlink within the gNB-CU-UP,
1537 // for all PDCP packets.
1538 // Note: DRB.PdcpSduDelayDlDist.Bin_Filter, where Bin indicates a delay range which is vendor specific
1539 {"DRB.PdcpSduDelayDlDist", GNBCUUP, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1540
1541 // 5.1.3.3.5 Distribution of delay DL on F1-U
1542 // Description: This measurement provides the distribution of GTP packet delay DL on the F1-U interface.
1543 // Note: DRB.GtpF1DelayDlDist.Bin_Filter, where Bin indicates a delay range which is vendor specific
1544 {"DRB.GtpF1DelayDlDist", GNBCUUP, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1545
1546 // 5.1.3.3.6 Distribution of delay DL in gNB-DU
1547 // Description: This measurement provides the distribution of RLC SDU delay on the downlink within the gNB-DU,
1548 // for initial transmission of all RLC packets.
1549 // Note: DRB.RlcSduDelayDlDist.Bin_Filter, where Bin indicates a delay range which is vendor specific
1550 {"DRB.RlcSduDelayDlDist", NRCellDU, DER, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1551
1552 // --------------------------------------------------------------------------------------------------------------- //
1553 // 5.1.3.4 IP Latency measurements
1554 // 5.1.3.4.1 General information -> no metric defined
1555 // 5.1.3.4.2 Average IP Latency DL in gNB-DU
1556 // Description: This measurement provides the average IP Latency in DL (arithmetic mean) within the gNB-DU,
1557 // when there is no other prior data to be transmitted to the same UE in the gNB-DU.
1558 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1559 {"DRB.RlcSduLatencyDl", NRCellDU, DER, REAL, "0.1ms", NO_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1560
1561 // 5.1.3.4.3 Distribution of IP Latency DL in gNB-DU
1562 // Description: This measurement provides the distribution of IP Latency in DL within the gNB-DU,
1563 // when there is no other prior data to be transmitted to the same UE in the gNB-DU.
1564 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1565 {"DRB.RlcSduLatencyDlDist", NRCellDU, DER, INTEGER, "-", DIST_BIN_X_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1566
1567 // --------------------------------------------------------------------------------------------------------------- //
1568 // 5.1.3.5 UE Context Release
1569 // 5.1.3.5.1 UE Context Release Request (gNB-DU initiated)
1570 // Description: This measurement provides the number of UE CONTEXT Release initiated by gNB-DU for each release cause.
1571 // Note: The nof measurements is equal to the nof causes plus a possible sum value identified by the .sum suffix.
1572 // Note: mandatory Cause-label not supported in e2sm_kpm
1573 {"UECNTX.RelReq", NRCellDU | BEAM, SI, INTEGER, "-", NO_LABEL | SUM_LABEL, E2_NODE_LEVEL},
1574
1575 // 5.1.3.5.2 Number of UE Context Release Requests (gNB-CU initiated)
1576 // Description: This measurement provides the number of UE CONTEXT RELEASE initiated by gNB-CU for each release cause.
1577 // Note: The nof measurements is equal to the nof causes plus a possible sum value identified by the .sum suffix.
1578 // Note: mandatory Cause-label not supported in e2sm_kpm
1579 {"UECNTX.RelCmd", NRCellCU | BEAM, SI, INTEGER, "-", NO_LABEL | SUM_LABEL, E2_NODE_LEVEL},
1580
1581 // --------------------------------------------------------------------------------------------------------------- //
1582 // 5.1.3.6 PDCP data volume measurements
1583 // Note: Definition changed in O-RAN.WG3.E2SM-KPM-R003-v3.00 (Sec. 7.9) to enable ALL_LEVELS (NODE, UE and QOS)
1584 // 5.1.3.6.1 PDCP PDU data volume Measurement
1585 // 5.1.3.6.1.1 DL PDCP PDU Data Volume
1586 // Description: This measurement provides the Data Volume (amount of PDCP PDU bits) in the downlink delivered
1587 // from GNB-CU to GNB-DU.
1588 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1589 {"QosFlow.PdcpPduVolumeDL", NRCellCU | GNBCUUP, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1590
1591 // 5.1.3.6.1.2 UL PDCP PDU Data Volume
1592 // Description: This measurement provides the Data Volume (amount of PDCP PDU bits) in the uplink delievered
1593 // from GNB-DU to GNB-CU.
1594 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1595 {"QosFlow.PdcpPduVolumeUL", NRCellCU | GNBCUUP, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1596
1597 // 5.1.3.6.2 PDCP SDU data volume Measurement
1598 // 5.1.3.6.2.1 DL PDCP SDU Data Volume
1599 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the downlink
1600 // delivered to PDCP layer.
1601 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1602 {"QosFlow.PdcpSduVolumeDl", NRCellCU | GNBCUUP, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1603
1604 // 5.1.3.6.2.2 UL PDCP SDU Data Volume
1605 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the uplink delivered from
1606 // PDCP layer to SDAP layer or UPF.
1607 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1608 {"QosFlow.PdcpSduVolumeUl", NRCellCU | GNBCUUP, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1609
1610 // 5.1.3.6.2.3 DL PDCP SDU Data Volume per interface
1611 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the downlink delivered
1612 // from GNB-CU-UP to GNB-DU (F1-U interface), to external gNB-CU-UP (Xn-U interface)
1613 // and to external eNB (X2-U interface).
1614 // Note: different filters (labels) set for each entity
1615 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1616 // Note: X2uPdcpSduVolumeDl and XnuPdcpSduVolumeDl defined in O-RAN.WG3.E2SM-KPM-R003-v3.00 Section 7.9.1
1617 {"DRB.F1uPdcpSduVolumeDL", EP_F1U, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1618 {"DRB.X2uPdcpSduVolumeDl", EP_X2U, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL, ALL_LEVELS},
1619 {"DRB.XnuPdcpSduVolumeDl", EP_XnU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1620
1621
1622 // 5.1.3.6.2.4 UL PDCP SDU Data Volume per interface
1623 // Description: This measurement provides the Data Volume (amount of PDCP SDU bits) in the uplink delivered
1624 // to GNB-CU-UP from GNB-DU (F1-U interface), from external gNB-CU-UP (Xn-U interface)
1625 // and from external eNB (X2-U interface).
1626 // Note: different filters (labels) set for each entity
1627 // Note: Unit changed from Mbit to kbit in O-RAN.WG3.E2SM-KPM-R003-v3.00
1628 // Note: X2uPdcpSduVolumeUl and XnuPdcpSduVolumeDl defined in O-RAN.WG3.E2SM-KPM-R003-v3.00 Section 7.9.1
1629 {"DRB.F1uPdcpSduVolumeUL", EP_F1U, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1630 {"DRB.X2uPdcpSduVolumeUl", EP_X2U, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL, ALL_LEVELS},
1631 {"DRB.XnuPdcpSduVolumeUl", EP_XnU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1632
1633 // --------------------------------------------------------------------------------------------------------------- //
1634 // 5.1.3.7 Handovers measurements
1635 // 5.1.3.7.1 Intra-gNB handovers
1636 // 5.1.3.7.1.1 Number of requested legacy handover preparations
1637 // Description: This measurement provides the number of outgoing intra-gNB legacy handover preparations
1638 // requested by the source NRCellCU for split gNB deployment.
1639 {"MM.HoPrepIntraReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1640
1641 // 5.1.3.7.1.2 Number of successful legacy handover preparations
1642 // Description: This measurement provides the number of successful intra-gNB legacy handover preparations
1643 // received by the source NRCellCU, for split gNB deployment.
1644 {"MM.HoPrepIntraSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1645
1646 // 5.1.3.7.1.3 Number of requested conditional handover preparations
1647 // Description: This measurement provides the number of outgoing intra-gNB conditional handover preparations
1648 // requested by the source NRCellCU for a split gNB deployment.
1649 {"MM.ChoPrepIntraReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1650
1651 // 5.1.3.7.1.4 Number of successful conditional handover preparations
1652 // Description: This measurement provides the number of successful intra-gNB conditional handover preparations
1653 // received by the source NRCellCU, for a split gNB deployment.
1654 {"MM.ChoPrepIntraSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1655
1656 // 5.1.3.7.1.5 Number of requested DAPS handover preparations
1657 // Description: This measurement provides the number of outgoing intra-gNB DAPS handover preparations requested
1658 // by the source NRCellCU for a split gNB deployment.
1659 {"MM.DapsHoPrepIntraReq", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1660
1661 // 5.1.3.7.1.6 Number of successful DAPS handover preparations
1662 // Description: This measurement provides the number of successful intra-gNB DAPS handover preparations received
1663 // by the source NRCellCU, for a split gNB deployment.
1664 {"MM.DapsHoPrepIntraSucc", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1665
1666 // 5.1.3.7.1.7 Number of UEs for which conditional handover preparations are requested
1667 // Description: This measurement provides the number of UEs for which outgoing intra-gNB conditional handover
1668 // preparations are requested by the source NRCellCU for a split gNB deployment.
1669 {"MM.ChoPrepIntraReqUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1670
1671 // 5.1.3.7.1.8 Number of UEs for which conditional handover preparations are successful
1672 // Description: This measurement provides the number of UEs for which intra-gNB conditional handover preparations
1673 // received by the source NRCellCU are successful, for a split gNB deployment.
1674 {"MM.ChoPrepIntraSuccUes", NRCellCU, CC, INTEGER, "-", NO_LABEL, E2_NODE_LEVEL},
1675
1676 // 5.1.3.8 Void -> no metric defined
1677 // 5.1.3.9 Void -> no metric defined
1678
1679 // --------------------------------------------------------------------------------------------------------------- //
1680 // 5.7 Common performance measurements for NFs
1681 // 5.7.1 VR usage of NF
1682 // 5.7.1.1 Virtual CPU usage
1683 // 5.7.1.1.1 Mean virtual CPU usage
1684 // Description: This measurement provides the mean usage of the underlying virtualized CPUs for a virtualized
1685 // 3GPP NF.
1686 // Note: source can be any NF
1687 {"VR.VCpuUsageMean", ANY, OM, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL},
1688
1689 // 5.7.1.2 Virtual memory usage
1690 // 5.7.1.2.1 Mean virtual memory usage
1691 // Description: This measurement provides the mean usage of the underlying virtualized memories for a virtualized
1692 // 3GPP NF.
1693 // Note: source can be any NF
1694 {"VR.VMemoryUsageMean", ANY, OM, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL},
1695
1696 // 5.7.1.3 Virtual disk usage
1697 // 5.7.1.3.1 Mean virtual disk usage
1698 // Description: This measurement provides the mean usage of the underlying virtualized disks for a virtualized
1699 // 3GPP NF.
1700 // Note: source can be any NF
1701 {"VR.VDiskUsageMean", ANY, OM, INTEGER, "%", NO_LABEL, E2_NODE_LEVEL}}};
1702 // clang-format on
1703 return metrics;
1704};

◆ get_e2sm_kpm_oran_metrics()

span< const e2sm_kpm_metric_t > srsran::get_e2sm_kpm_oran_metrics ( )
inline
1708{
1709 // clang-format off
1710 static const std::array<e2sm_kpm_metric_t, NOF_ORAN_E2SM_KPM_METRICS> metrics = {{
1711 // 7.10 O-RAN specific Performance Measurement
1712 // 7.10.1 DL Transmitted Data Volume
1713 // Description: This measurement provides the transmitted data volume in the downlink in a measurement time.
1714 {"DRB.RlcSduTransmittedVolumeDL", NRCellDU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1715
1716 // 7.10.2 UL Transmitted Data Volume
1717 // Description: This measurement provides the transmitted data volume in the uplink in a certain period.
1718 {"DRB.RlcSduTransmittedVolumeUL", NRCellDU, CC, INTEGER, "kbit", PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1719
1720 // 7.10.3 Distribution of Percentage of DL Transmitted Data Volume to Incoming Data Volume
1721 // Description: This measurement provides the distribution of the percentage of successfully transmitted data
1722 // volume to incoming data volume in downlink for UEs.
1723 // Note: DRB.PerDataVolumeDLDist.Bin where Bin represents the bin width
1724 {"DRB.PerDataVolumeDLDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1725
1726 // 7.10.4 Distribution of Percentage of UL Transmitted Data Volume to Incoming Data Volume
1727 // Description: This measurement provides the distribution of the percentage of successfully transmitted data
1728 // volume to incoming data volume in uplink for UEs.
1729 // Note: DRB.PerDataVolumeULDist.Bin where Bin represents the bin width
1730 {"DRB.PerDataVolumeULDist", NRCellDU, CC, INTEGER, "-", DIST_BIN_X_LABEL | PLMN_ID_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1731
1732 // 7.10.5 Distribution of DL Packet Drop Rate
1733 // Description: This measurement provides the fraction of RLC SDU packets which are dropped on the downlink,
1734 // due to high traffic load, traffic management etc in the gNB-DU.
1735 // Note: integer value representing the drop rate multiplied by 1e6 of each UE within the range of the bin
1736 // Note: drop rate multiplied by 1e6?
1737 {"DRB.RlcPacketDropRateDLDist", NRCellDU, SI, INTEGER, "-", DIST_BIN_X_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1738
1739 // 7.10.6 Distribution of UL Packet Loss Rate
1740 // Description: This measurement provides the distribution of the fraction of PDCP SDU packets
1741 // which are not successfully received at gNB-CU-UP.
1742 // Note: integer value representing the loss rate multiplied by 1E6 of each UE within the range of the bin
1743 // Note: loss rate multiplied by 1e6?
1744 {"DRB.PacketLossRateULDist", NRCellCU | GNBCUUP, SI, INTEGER, "-", DIST_BIN_X_LABEL | FIVE_QI_LABEL | SLICE_ID_LABEL, ALL_LEVELS},
1745
1746 // 7.10.7 DL Synchronization Signal based Reference Signal Received Power (SS-RSRP)
1747 // Description: This measurement provides the average of the DL SS-RSRP (see TS 38.215 [16]) values reported
1748 // from UEs in the cell when SS-RSRP is used for L1-RSRP as configured by reporting configurations
1749 // as defined in TS 38.214 [18], in case the L1-RSRP report function is enabled.
1750 // Note: Separate counters are maintained for each SSB in the cell.
1751 {"L1M.DL-SS-RSRP", NRCellDU, DER, REAL, "-", SSB_IDX_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1752
1753 // 7.10.8 DL Synchronization Signal based Signal to Noise and Interference Ratio (SS-SINR)
1754 // Description: This measurement provides the average of the DL SS-SINR (see TS 38.215 [16]) values reported
1755 // from UEs in the cell when SS-SINR is used for L1-SINR as configured by reporting configurations
1756 // as defined in TS 38.214 [18], in case the L1-SINR report function is enabled.
1757 // Note: Separate counters are maintained for each SSB in the cell.
1758 {"L1M.DL-SS-SINR", NRCellDU, DER, REAL, "-", SSB_IDX_LABEL, E2_NODE_LEVEL | UE_LEVEL},
1759
1760 // 7.10.9 UL Sounding Reference Signal based Reference Signal Received Power (SRS-RSRP)
1761 // Description: This measurement provides the average of the UL SRS-RSRP (see TS 38.215 [16])
1762 // values measured for UEs in the cell.
1763 {"L1M.UL-SRS-RSRP", NRCellDU, DER, REAL, "W", NO_LABEL, E2_NODE_LEVEL | UE_LEVEL}}};
1764 // clang-format on
1765 return metrics;
1766}

◆ get_e2sm_rc_control_style_def()

bool srsran::get_e2sm_rc_control_style_def ( uint32_t style_id,
e2sm_rc_control_service_def_t & control_service_def )
inline
44{
45 static const std::array<e2sm_rc_control_service_def_t, NOF_E2SM_RC_CTRL_SERVICE_STYLES> style_defs = {{
46 {1, "Radio Bearer Control", 1, 1, 1, 1},
47 {2, "Radio Resource Allocation Control", 1, 1, 1, 1},
48 {3, "Connected Mode Mobility Control", 1, 1, 1, 1},
49 {4, "Radio Access Control", 1, 1, 1, 1},
50 {5, "Dual Connectivity (DC) Control", 1, 1, 1, 1},
51 {6, "Carrier Aggregation (CA) Control", 1, 1, 1, 1},
52 {7, "Idle Mode Mobility Control", 1, 1, 1, 1},
53 {8, "UE Information And Assignment", 0, 1, 1, 1},
54 {9, "Measurement Reporting Configuration Control", 0, 1, 1, 3},
55 {10, "Beamforming Configuration Control", 0, 1, 1, 0},
56 {255, "Multiple Actions Control", 1, 2, 2, 2},
57 }};
58
59 for (auto& style_def : style_defs) {
60 if (style_def.style_id == style_id) {
61 control_service_def = style_def;
62 return true;
63 }
64 }
65 return false;
66}

◆ get_gnb_cu_cp_ue_e1ap_id() [1/4]

expected< gnb_cu_cp_ue_e1ap_id_t > srsran::get_gnb_cu_cp_ue_e1ap_id ( const asn1::e1ap::e1ap_pdu_c & pdu)
inline
179{
180 using namespace asn1::e1ap;
181 switch (pdu.type().value) {
182 case e1ap_pdu_c::types_opts::init_msg:
183 return get_gnb_cu_cp_ue_e1ap_id(pdu.init_msg());
184 case e1ap_pdu_c::types_opts::successful_outcome:
185 return get_gnb_cu_cp_ue_e1ap_id(pdu.successful_outcome());
186 case e1ap_pdu_c::types_opts::unsuccessful_outcome:
187 return get_gnb_cu_cp_ue_e1ap_id(pdu.unsuccessful_outcome());
188 default:
189 break;
190 }
191 return {default_error_t{}};
192}

◆ get_gnb_cu_cp_ue_e1ap_id() [2/4]

expected< gnb_cu_cp_ue_e1ap_id_t > srsran::get_gnb_cu_cp_ue_e1ap_id ( const asn1::e1ap::init_msg_s & init_msg)
inline
147{
149 switch (init_msg.value.type()) {
150 case init_msg_type::bearer_context_setup_request:
151 return (gnb_cu_cp_ue_e1ap_id_t)init_msg.value.bearer_context_setup_request()->gnb_cu_cp_ue_e1ap_id;
152 case init_msg_type::bearer_context_release_cmd:
153 return (gnb_cu_cp_ue_e1ap_id_t)init_msg.value.bearer_context_release_cmd()->gnb_cu_cp_ue_e1ap_id;
154 case init_msg_type::bearer_context_mod_request:
155 return (gnb_cu_cp_ue_e1ap_id_t)init_msg.value.bearer_context_mod_request()->gnb_cu_cp_ue_e1ap_id;
156 case init_msg_type::bearer_context_mod_required:
157 return (gnb_cu_cp_ue_e1ap_id_t)init_msg.value.bearer_context_mod_required()->gnb_cu_cp_ue_e1ap_id;
158 case init_msg_type::bearer_context_release_request:
159 return (gnb_cu_cp_ue_e1ap_id_t)init_msg.value.bearer_context_release_request()->gnb_cu_cp_ue_e1ap_id;
160 default:
161 break;
162 }
163 return {default_error_t{}};
164}

◆ get_gnb_cu_cp_ue_e1ap_id() [3/4]

expected< gnb_cu_cp_ue_e1ap_id_t > srsran::get_gnb_cu_cp_ue_e1ap_id ( const asn1::e1ap::successful_outcome_s & success_outcome)
inline
168{
169 return {default_error_t{}};
170}

◆ get_gnb_cu_cp_ue_e1ap_id() [4/4]

expected< gnb_cu_cp_ue_e1ap_id_t > srsran::get_gnb_cu_cp_ue_e1ap_id ( const asn1::e1ap::unsuccessful_outcome_s & unsuccessful_outcome)
inline
174{
175 return {default_error_t{}};
176}

◆ get_gnb_cu_up_ue_e1ap_id() [1/4]

expected< gnb_cu_up_ue_e1ap_id_t > srsran::get_gnb_cu_up_ue_e1ap_id ( const asn1::e1ap::e1ap_pdu_c & pdu)
inline
227{
228 using namespace asn1::e1ap;
229 switch (pdu.type().value) {
230 case e1ap_pdu_c::types_opts::init_msg:
231 return get_gnb_cu_up_ue_e1ap_id(pdu.init_msg());
232 case e1ap_pdu_c::types_opts::successful_outcome:
233 return get_gnb_cu_up_ue_e1ap_id(pdu.successful_outcome());
234 case e1ap_pdu_c::types_opts::unsuccessful_outcome:
235 return get_gnb_cu_up_ue_e1ap_id(pdu.unsuccessful_outcome());
236 default:
237 break;
238 }
239 return {default_error_t{}};
240}

◆ get_gnb_cu_up_ue_e1ap_id() [2/4]

expected< gnb_cu_up_ue_e1ap_id_t > srsran::get_gnb_cu_up_ue_e1ap_id ( const asn1::e1ap::init_msg_s & init_msg)
inline
197{
199 switch (init_msg.value.type()) {
200 case init_msg_type::bearer_context_release_cmd:
201 return (gnb_cu_up_ue_e1ap_id_t)init_msg.value.bearer_context_release_cmd()->gnb_cu_up_ue_e1ap_id;
202 case init_msg_type::bearer_context_mod_request:
203 return (gnb_cu_up_ue_e1ap_id_t)init_msg.value.bearer_context_mod_request()->gnb_cu_up_ue_e1ap_id;
204 case init_msg_type::bearer_context_mod_required:
205 return (gnb_cu_up_ue_e1ap_id_t)init_msg.value.bearer_context_mod_required()->gnb_cu_up_ue_e1ap_id;
206 case init_msg_type::bearer_context_release_request:
207 return (gnb_cu_up_ue_e1ap_id_t)init_msg.value.bearer_context_release_request()->gnb_cu_up_ue_e1ap_id;
208 default:
209 break;
210 }
211 return {default_error_t{}};
212}

◆ get_gnb_cu_up_ue_e1ap_id() [3/4]

expected< gnb_cu_up_ue_e1ap_id_t > srsran::get_gnb_cu_up_ue_e1ap_id ( const asn1::e1ap::successful_outcome_s & success_outcome)
inline
216{
217 return {default_error_t{}};
218}

◆ get_gnb_cu_up_ue_e1ap_id() [4/4]

expected< gnb_cu_up_ue_e1ap_id_t > srsran::get_gnb_cu_up_ue_e1ap_id ( const asn1::e1ap::unsuccessful_outcome_s & unsuccessful_outcome)
inline
222{
223 return {default_error_t{}};
224}

◆ get_gnb_du_ue_f1ap_id() [1/4]

expected< gnb_du_ue_f1ap_id_t > srsran::get_gnb_du_ue_f1ap_id ( const asn1::f1ap::f1ap_pdu_c & pdu)
inline
189{
190 using namespace asn1::f1ap;
191 switch (pdu.type().value) {
192 case f1ap_pdu_c::types_opts::init_msg:
193 return get_gnb_du_ue_f1ap_id(pdu.init_msg());
194 case f1ap_pdu_c::types_opts::successful_outcome:
195 return get_gnb_du_ue_f1ap_id(pdu.successful_outcome());
196 case f1ap_pdu_c::types_opts::unsuccessful_outcome:
197 return get_gnb_du_ue_f1ap_id(pdu.unsuccessful_outcome());
198 default:
199 break;
200 }
201 return {default_error_t{}};
202}

◆ get_gnb_du_ue_f1ap_id() [2/4]

expected< gnb_du_ue_f1ap_id_t > srsran::get_gnb_du_ue_f1ap_id ( const asn1::f1ap::init_msg_s & init_msg)
inline
149{
151 switch (init_msg.value.type()) {
152 case init_msg_type::ue_context_setup_request:
153 if (init_msg.value.ue_context_setup_request()->gnb_du_ue_f1ap_id_present) {
154 return (gnb_du_ue_f1ap_id_t)init_msg.value.ue_context_setup_request()->gnb_du_ue_f1ap_id;
155 }
156 return {default_error_t{}};
157 case init_msg_type::ue_context_release_cmd:
158 return (gnb_du_ue_f1ap_id_t)init_msg.value.ue_context_release_cmd()->gnb_du_ue_f1ap_id;
159 case init_msg_type::ue_context_mod_request:
160 return (gnb_du_ue_f1ap_id_t)init_msg.value.ue_context_mod_request()->gnb_du_ue_f1ap_id;
161 case init_msg_type::ue_context_mod_required:
162 return (gnb_du_ue_f1ap_id_t)init_msg.value.ue_context_mod_required()->gnb_du_ue_f1ap_id;
163 case init_msg_type::ue_context_release_request:
164 return (gnb_du_ue_f1ap_id_t)init_msg.value.ue_context_release_request()->gnb_du_ue_f1ap_id;
165 case init_msg_type::dl_rrc_msg_transfer:
166 return (gnb_du_ue_f1ap_id_t)init_msg.value.dl_rrc_msg_transfer()->gnb_du_ue_f1ap_id;
167 case init_msg_type::ul_rrc_msg_transfer:
168 return (gnb_du_ue_f1ap_id_t)init_msg.value.ul_rrc_msg_transfer()->gnb_du_ue_f1ap_id;
169 case init_msg_type::init_ul_rrc_msg_transfer:
170 return (gnb_du_ue_f1ap_id_t)init_msg.value.init_ul_rrc_msg_transfer()->gnb_du_ue_f1ap_id;
171 default:
172 break;
173 }
174 return {default_error_t{}};
175}

◆ get_gnb_du_ue_f1ap_id() [3/4]

expected< gnb_du_ue_f1ap_id_t > srsran::get_gnb_du_ue_f1ap_id ( const asn1::f1ap::successful_outcome_s & success_outcome)
inline
178{
179 return {default_error_t{}};
180}

◆ get_gnb_du_ue_f1ap_id() [4/4]

expected< gnb_du_ue_f1ap_id_t > srsran::get_gnb_du_ue_f1ap_id ( const asn1::f1ap::unsuccessful_outcome_s & unsuccessful_outcome)
inline
184{
185 return {default_error_t{}};
186}

◆ get_host_max_cpu_id()

size_t srsran::get_host_max_cpu_id ( )

Get maximum CPU ID available to the application.

86{
87 return host_desc.max_cpu_id;
88}

◆ get_ldpc_base_graph()

constexpr ldpc_base_graph_type srsran::get_ldpc_base_graph ( float R,
units::bits A )
constexpr

Returns the LDPC base graph based on the given code rate and transport block size in bits, as per TS 38.212 section 7.2.2.

Parameters
RTarget code rate, parameter $R$.
ASize in bits of the payload $A$.
39{
40 srsran_assert(R > 0.F && R < 1.F, "Invalid target code rate {}, expected a value between 0 and 1", R);
41
42 using namespace units::literals;
43 if (A <= 292_bits || R <= 0.25F || (A <= 3824_bits && R <= 0.67F)) {
44 return ldpc_base_graph_type::BG2;
45 }
46
47 return ldpc_base_graph_type::BG1;
48}

◆ get_mac_sdu_payload_size()

unsigned srsran::get_mac_sdu_payload_size ( unsigned mac_sdu_size)
inline
49{
50 if (mac_sdu_size <= MAC_SDU_SUBHEADER_LENGTH_THRES - 1 + MIN_MAC_SDU_SUBHEADER_SIZE) {
51 return mac_sdu_size - MIN_MAC_SDU_SUBHEADER_SIZE;
52 }
53 return mac_sdu_size - MAX_MAC_SDU_SUBHEADER_SIZE;
54}

◆ get_mac_sdu_required_bytes()

unsigned srsran::get_mac_sdu_required_bytes ( unsigned payload)
inline

Derive MAC SDU total size in bytes (includes subheader).

44{
45 return payload + get_mac_sdu_subheader_size(payload);
46}
unsigned get_mac_sdu_subheader_size(unsigned payload)
Derive MAC SDU subheader size in bytes as per TS38.321, Section 6.1.
Definition mac_pdu_format.h:35

◆ get_mac_sdu_subheader_size()

unsigned srsran::get_mac_sdu_subheader_size ( unsigned payload)
inline

Derive MAC SDU subheader size in bytes as per TS38.321, Section 6.1.

36{
37 return payload == 0 ? 0
38 : payload >= MAC_SDU_SUBHEADER_LENGTH_THRES ? MAX_MAC_SDU_SUBHEADER_SIZE
39 : MIN_MAC_SDU_SUBHEADER_SIZE;
40}

◆ get_max_mcs_ul()

sch_mcs_index srsran::get_max_mcs_ul ( pusch_mcs_table mcs_table)
inline

Retrieves the maximum MCS value for a given MCS table.

49{
50 return mcs_table == pusch_mcs_table::qam256 ? 27 : 28;
51}

◆ get_max_Nprb()

std::size_t srsran::get_max_Nprb ( unsigned dl_bw_mhz,
subcarrier_spacing scs,
frequency_range fr )
inline

Computes the maximum transmission bandwidth in number of PRBs.

Remarks
See TS 38.104, Table 5.3.2-1/2 - Transmission bandwidth configuration for FR1/FR2.
100{
101 srsran_sanity_check(is_scs_valid(scs, fr), "Invalid SCS");
102 static constexpr std::array<std::size_t, 3> rb_table_fr1[] = {
103 // clang-format off
104 // SCS
105 // 15, 30, 60.
106 { 25, 11, 0}, // 5 MHz.
107 { 52, 24, 11}, // 10 MHz.
108 { 79, 38, 18}, // 15 MHz.
109 { 106, 51, 24}, // 20 MHz.
110 { 133, 65, 31}, // 25 MHz.
111 { 160, 78, 38}, // 30 MHz.
112 { 216, 106, 51}, // 40 MHz.
113 { 270, 133, 65}, // 50 MHz.
114 { 0, 162, 79}, // 60 MHz.
115 { 0, 189, 93}, // 70 MHz.
116 { 0, 217, 107}, // 80 MHz.
117 { 0, 245, 121}, // 90 MHz.
118 { 0, 273, 135}, // 100 MHz.
119 // clang-format on
120 };
121 static constexpr std::array<std::size_t, 2> rb_table_fr2[] = {
122 // clang-format off
123 // SCS
124 // 60, 120.
125 { 66, 32}, // 50 MHz.
126 { 132, 66}, // 100 MHz.
127 { 264, 132}, // 200 MHz.
128 { 0, 264}, // 400 MHz.
129 // clang-format on
130 };
131
132 size_t bw_idx;
133 if (fr == frequency_range::FR1) {
134 bw_idx = channel_bw_mhz_to_index_fr1(dl_bw_mhz);
135 if (bw_idx == std::numeric_limits<size_t>::max()) {
136 return 0;
137 }
138 return rb_table_fr1[bw_idx][to_numerology_value(scs)];
139 }
140
141 bw_idx = channel_bw_mhz_to_index_fr2(dl_bw_mhz);
142 if (bw_idx == std::numeric_limits<size_t>::max()) {
143 return 0;
144 }
145 return rb_table_fr2[bw_idx][to_numerology_value(scs) - to_numerology_value(subcarrier_spacing::kHz60)];
146}
constexpr std::size_t channel_bw_mhz_to_index_fr1(unsigned dl_bw_mhz)
Converts channel bandwidth in MHz to index.
Definition resource_block.h:44
constexpr bool is_scs_valid(subcarrier_spacing scs)
Check if SCS value is valid.
Definition subcarrier_spacing.h:37
constexpr std::size_t channel_bw_mhz_to_index_fr2(unsigned dl_bw_mhz)
Converts channel bandwidth in MHz to index.
Definition resource_block.h:80

◆ get_message_type_str() [1/3]

const char * srsran::get_message_type_str ( const asn1::e1ap::e1ap_pdu_c & pdu)
inline

Extracts message type.

55{
56 switch (pdu.type().value) {
57 case asn1::e1ap::e1ap_pdu_c::types_opts::init_msg:
58 return pdu.init_msg().value.type().to_string();
59 case asn1::e1ap::e1ap_pdu_c::types_opts::successful_outcome:
60 return pdu.successful_outcome().value.type().to_string();
61 case asn1::e1ap::e1ap_pdu_c::types_opts::unsuccessful_outcome:
62 return pdu.unsuccessful_outcome().value.type().to_string();
63 default:
64 break;
65 }
66 report_fatal_error("Invalid E1AP PDU type \"{}\"", pdu.type().to_string());
67}

◆ get_message_type_str() [2/3]

const char * srsran::get_message_type_str ( const asn1::e2ap::e2_ap_pdu_c & pdu)
inline

Extracts message type.

90{
91 switch (pdu.type().value) {
92 case asn1::e2ap::e2_ap_pdu_c::types_opts::init_msg:
93 return pdu.init_msg().value.type().to_string();
94 case asn1::e2ap::e2_ap_pdu_c::types_opts::successful_outcome:
95 return pdu.successful_outcome().value.type().to_string();
96 case asn1::e2ap::e2_ap_pdu_c::types_opts::unsuccessful_outcome:
97 return pdu.unsuccessful_outcome().value.type().to_string();
98 default:
99 break;
100 }
101 report_fatal_error("Invalid E2AP PDU type \"{}\"", pdu.type().to_string());
102}

◆ get_message_type_str() [3/3]

const char * srsran::get_message_type_str ( const asn1::f1ap::f1ap_pdu_c & pdu)
inline

Extracts message type.

55{
56 switch (pdu.type().value) {
57 case asn1::f1ap::f1ap_pdu_c::types_opts::init_msg:
58 return pdu.init_msg().value.type().to_string();
59 case asn1::f1ap::f1ap_pdu_c::types_opts::successful_outcome:
60 return pdu.successful_outcome().value.type().to_string();
61 case asn1::f1ap::f1ap_pdu_c::types_opts::unsuccessful_outcome:
62 return pdu.unsuccessful_outcome().value.type().to_string();
63 default:
64 break;
65 }
66 report_fatal_error("Invalid F1AP PDU type \"{}\"", pdu.type().to_string());
67}

◆ get_msg3_delay()

unsigned srsran::get_msg3_delay ( const pusch_time_domain_resource_allocation & pusch_td_res_alloc,
subcarrier_spacing pusch_scs )

Get MSG3 Delay.

Parameters
[in]pusch_td_res_allocPUSCH-TimeDomainResourceAllocation.
[in]pusch_scsSCS used by initial UL BWP.
Returns
Msg3 delay in number of slots.
40{
41 // In TS 38.214, Table 6.1.2.1.1-5, Delta is only defined for PUSCH SCS within [kHz15, kHz120kHz].
42 srsran_sanity_check(to_numerology_value(pusch_scs) <= to_numerology_value(subcarrier_spacing::kHz120),
43 "PUSCH subcarrier spacing not supported for MSG3 delay");
44
45 // The array represents Table 6.1.2.1.1-5, in TS 38.214.
46 static const std::array<uint8_t, 4> DELTAS{2, 3, 4, 6};
47
48 // The MSG3 slot is defined as MSG3_slot = floor( n * (2^*(mu_PUSCH) ) / (2^*(mu_PDCCH) ) ) + k2 + Delta.
49 // Given the assumption mu_PUSCH == mu_PDCCH, MSG3_delay simplifies to MSG3_delay = k2 + Delta
50 // [TS 38.214, Section 6.1.2.1 and 6.1.2.1.1].
51
52 return static_cast<int>(pusch_td_res_alloc.k2 + DELTAS[to_numerology_value(pusch_scs)]);
53}

◆ get_N_ID_dmrs()

unsigned srsran::get_N_ID_dmrs ( pci_t pci,
const coreset_configuration & cs_cfg )
inline

Calculates $N_{ID}$ as per TS38.211, 7.4.1.3.1.

62{
64 return cs_cfg.pdcch_dmrs_scrambling_id.value();
65 }
66 return pci;
67}
optional< unsigned > pdcch_dmrs_scrambling_id
PDCCH DMRS scrambling initialization. Values: (0..65535).
Definition coreset.h:75

◆ get_nof_prbs()

sch_prbs_tbs srsran::get_nof_prbs ( const prbs_calculator_sch_config & sch_config,
unsigned max_nof_available_rbs = 273U )

Computes the required number of PRBs necessary to transmit a given payload size.

This function implements the inverse procedure of the TBS calculation procedure (as per TS38.214 Section 5.1.3.2) to derive the number of PRBs from a given payload in bytes.

Parameters
[in]sch_configis a struct with the PDSCH configuration to compute the num. of PRBs.
[in]max_nof_available_rbsis the maximum number or available of PRBs within the BWP. By default, this is set to the maximum number of RBs for FR1, as per Table 5.3.2-1, TS 38.104.
Returns
Returns a struct with the number of PRBs and the corresponding TBS. If the payload_size is greater than 478 bytes (3824 bits), it returns the number of PRBs and TBS corresponding to maximum allowed payload size of 478 bytes.
140{
141 // Get a first estimate for the number of PRBs.
143
144 // Linearly search for the optimal number of PRBs using "nof_prbs_estimate" as initial guess.
145 return linear_search_nof_prbs_upper_bound(sch_config, nof_prbs_estimate, max_nof_available_rbs);
146}
unsigned estimate_required_nof_prbs(const prbs_calculator_sch_config &sch_config, unsigned max_nof_available_rbs=273U)
Computes a coarse estimate of the number of required PRBs to transmit a given payload size....
Definition prbs_calculator.cpp:48

◆ get_nof_rbgs() [1/2]

unsigned srsran::get_nof_rbgs ( crb_interval bwp_rb_dims,
bool config1_or_2 )
49{
51 return get_nof_rbgs(bwp_rbs, P);
52}
nominal_rbg_size
Definition resource_block_group.h:40
unsigned get_nof_rbgs(crb_interval bwp_rb_dims, nominal_rbg_size P)
Definition resource_block_group.cpp:42
nominal_rbg_size get_nominal_rbg_size(unsigned bwp_nof_prb, bool is_config_1)
Definition resource_block_group.cpp:27

◆ get_nof_rbgs() [2/2]

unsigned srsran::get_nof_rbgs ( crb_interval bwp_rb_dims,
nominal_rbg_size P )

Calculates the total number of RBGs for a bandwidth part.

Remarks
See TS 38.214, Sections 5.1.2.2.1 and 6.1.2.2.1.
43{
44 return divide_ceil(bwp_rb_dims.length() + (bwp_rb_dims.start() % to_nominal_rbg_size_value(P)),
45 to_nominal_rbg_size_value(P));
46}

◆ get_nof_slots_per_subframe()

constexpr unsigned srsran::get_nof_slots_per_subframe ( subcarrier_spacing scs)
inlineconstexpr

Calculates number of slots per subframe.

107{
108 return 1U << to_numerology_value(scs);
109}

◆ get_nof_uci_codeblocks()

constexpr unsigned srsran::get_nof_uci_codeblocks ( unsigned message_length,
unsigned codeword_length )
constexpr

Gets the number of codeblocks for a transmission containing a UCI message.

The number of UCI codeblocks and codeword segmentation is described TS38.212 Section 6.3.1.2.1.

Parameters
[in]message_lengthNumber of payload bits in the UCI message. Parameter $A$.
[in]codeword_lengthNumber of encoded bits in the codeword. Parameter $E$.
Returns
The number of codeblocks the payload is divided into. One if $I_{seg}$ results in zero, otherwise two.
36{
37 if (((message_length >= 360) && (codeword_length >= 1088)) || (message_length >= 1013)) {
38 return 2;
39 }
40 return 1;
41}

◆ get_nominal_rbg_size()

nominal_rbg_size srsran::get_nominal_rbg_size ( unsigned bwp_nof_prb,
bool is_config_1 )

Calculates Nominal RBG size (P) based on the BWP number of PRBs and configuration type.

Remarks
See TS 38.214, Table 5.1.2.2.1-1 and 6.1.2.2.1-1.
28{
29 srsran_assert(bwp_nof_prb > 0 and bwp_nof_prb <= 275, "Invalid BWP size");
30 if (bwp_nof_prb <= 36) {
31 return is_config_1 ? nominal_rbg_size::P2 : nominal_rbg_size::P4;
32 }
33 if (bwp_nof_prb <= 72) {
34 return is_config_1 ? nominal_rbg_size::P4 : nominal_rbg_size::P8;
35 }
36 if (bwp_nof_prb <= 144) {
37 return is_config_1 ? nominal_rbg_size::P8 : nominal_rbg_size::P16;
38 }
39 return nominal_rbg_size::P16;
40}

◆ get_nsymb_per_slot()

constexpr unsigned srsran::get_nsymb_per_slot ( const cyclic_prefix cp)
inlineconstexpr

Defines the number of OFDM symbols per slot, according to TS 38.211 Tables 4.3.2-1 and 4.3.2-2.

109{
110 if (cp == cyclic_prefix::EXTENDED) {
111 return 12;
112 }
113 return 14;
114}

◆ get_paging_drx_in_nof_rf()

expected< unsigned > srsran::get_paging_drx_in_nof_rf ( const asn1::f1ap::paging_s & pdu)
inline
249{
250 using namespace asn1::f1ap;
251 switch (pdu->paging_drx.value) {
252 case paging_drx_opts::v32:
253 return 32;
254 case paging_drx_opts::v64:
255 return 64;
256 case paging_drx_opts::v128:
257 return 128;
258 case paging_drx_opts::v256:
259 return 256;
260 default:
261 break;
262 }
263 return {default_error_t{}};
264}

◆ get_paging_identity()

expected< uint64_t > srsran::get_paging_identity ( const asn1::f1ap::paging_s & pdu)
inline
217{
218 using namespace asn1::f1ap;
219 switch (pdu->paging_id.type()) {
220 case paging_id_c::types_opts::ran_ue_paging_id: {
221 return pdu->paging_id.ran_ue_paging_id().irnti.to_number();
222 }
223 case paging_id_c::types_opts::cn_ue_paging_id: {
224 return pdu->paging_id.cn_ue_paging_id().five_g_s_tmsi().to_number();
225 }
226 default:
227 break;
228 }
229 return {default_error_t{}};
230}

◆ get_paging_identity_type()

expected< paging_identity_type > srsran::get_paging_identity_type ( const asn1::f1ap::paging_s & pdu)
inline
233{
234 using namespace asn1::f1ap;
235 switch (pdu->paging_id.type()) {
236 case paging_id_c::types_opts::ran_ue_paging_id: {
237 return paging_identity_type::ran_ue_paging_identity;
238 }
239 case paging_id_c::types_opts::cn_ue_paging_id: {
240 return paging_identity_type::cn_ue_paging_identity;
241 }
242 default:
243 break;
244 }
245 return {default_error_t{}};
246}

◆ get_paging_priority()

expected< unsigned > srsran::get_paging_priority ( const asn1::f1ap::paging_s & pdu)
inline
267{
268 using namespace asn1::f1ap;
269 switch (pdu->paging_prio.value) {
270 case paging_prio_opts::priolevel1:
271 return 1;
272 case paging_prio_opts::priolevel2:
273 return 2;
274 case paging_prio_opts::priolevel3:
275 return 3;
276 case paging_prio_opts::priolevel4:
277 return 4;
278 case paging_prio_opts::priolevel5:
279 return 5;
280 case paging_prio_opts::priolevel6:
281 return 6;
282 case paging_prio_opts::priolevel7:
283 return 7;
284 case paging_prio_opts::priolevel8:
285 return 8;
286 default:
287 break;
288 }
289 return {default_error_t{}};
290}

◆ get_paging_ue_identity_index_value()

expected< unsigned > srsran::get_paging_ue_identity_index_value ( const asn1::f1ap::paging_s & pdu)
inline
205{
206 using namespace asn1::f1ap;
207 switch (pdu->ue_id_idx_value.type()) {
208 case ue_id_idx_value_c::types_opts::idx_len10:
209 return pdu->ue_id_idx_value.idx_len10().to_number();
210 default:
211 break;
212 }
213 return {default_error_t{}};
214}

◆ get_pdsch_antenna_port_mapping()

pdsch_antenna_ports_mapping srsran::get_pdsch_antenna_port_mapping ( unsigned nof_layers,
unsigned nof_dl_antenna_ports,
dmrs_config_type dmrs_cfg_type,
dmrs_max_length dmrs_max_len,
bool are_both_cws_enabled )

Returns the PDSCH antenna ports mapping from TS 38.212, tables 7.3.1.2.2-1/2/3/4 based on input configuration.

Parameters
[in]nof_layersNumber of layers.
[in]nof_dl_antenna_portsNumber of DL antenna ports supported by gNB.
[in]dmrs_cfg_typePDSCH DMRS configuration type.
[in]dmrs_max_lenPDSCH DMRS maximum number of OFDM symbols.
[in]are_both_cws_enabledFlag indicating whether Codeword 0 and Codeword 1 are enabled or not.
Returns
The PDSCH antenna ports mapping from TS 38.212, tables 7.3.1.2.2-1/2/3/4 based on DMRS configuration, nof. layers etc. If the given input configuration does not match any of the rows in the table, the function triggers an asserts. But if input configuration matches more than one row in the table, the first matching row information is returned.
288{
290 nof_layers, nof_dl_antenna_ports, dmrs_cfg_type, dmrs_max_len, are_both_cws_enabled);
291}

◆ get_pdsch_antenna_port_mapping_row_index()

unsigned srsran::get_pdsch_antenna_port_mapping_row_index ( unsigned nof_layers,
unsigned nof_dl_antenna_ports,
dmrs_config_type dmrs_cfg_type,
dmrs_max_length dmrs_max_len,
bool are_both_cws_enabled )

Returns the PDSCH antenna ports mapping row index in TS 38.212, tables 7.3.1.2.2-1/2/3/4.

Parameters
[in]nof_layersNumber of layers.
[in]nof_dl_antenna_portsNumber of DL antenna ports supported by gNB.
[in]dmrs_cfg_typePDSCH DMRS configuration type.
[in]dmrs_max_lenPDSCH DMRS maximum number of OFDM symbols.
[in]are_both_cws_enabledFlag indicating whether Codeword 0 and Codeword 1 are enabled or not.
Returns
The PDSCH antenna ports mapping row index from TS 38.212, tables 7.3.1.2.2-1/2/3/4 based on DMRS configuration, nof. layers etc. If the given input configuration does not match any of the rows in the table, the function triggers an asserts. But if input configuration matches more than one row in the table,the first matching row index is returned.
298{
300 return std::distance(mapping_table.begin(),
302 nof_layers, nof_dl_antenna_ports, dmrs_cfg_type, dmrs_max_len, are_both_cws_enabled));
303}

◆ get_pdsch_config_f1_0_c_rnti()

pdsch_config_params srsran::get_pdsch_config_f1_0_c_rnti ( const ue_cell_configuration & ue_cell_cfg,
const pdsch_time_domain_resource_allocation & pdsch_td_cfg )

Fetches the PDSCH parameters needed for PUSCH PDU for DCI format 1_0, scrambled by C-RNTI.

Returns parameters needed to compute the number of PRBs, MCS and TBS.

78{
79 // As per TS 38.214, Section 5.1.3.2, TB scaling filed can be different to 0 only for DCI 1_0 with P-RNTI, or RA-RNTI.
80 static constexpr unsigned tb_scaling_field = 0;
81 static constexpr unsigned nof_layers = 1;
82 static constexpr pdsch_mcs_table mcs_table = pdsch_mcs_table::qam64;
83
85
86 pdsch.dmrs =
87 make_dmrs_info_common(pdsch_td_cfg, ue_cell_cfg.cell_cfg_common.pci, ue_cell_cfg.cell_cfg_common.dmrs_typeA_pos);
88 // According to TS 38.214, Section 5.1.3.2, nof_oh_prb is set equal to xOverhead, when set; else nof_oh_prb = 0.
89 // NOTE: x_overhead::not_set is mapped to 0.
90 pdsch.nof_oh_prb = ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.has_value()
91 ? static_cast<unsigned>(ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.value().x_ov_head)
92 : static_cast<unsigned>(x_overhead::not_set);
93
94 pdsch.symbols = pdsch_td_cfg.symbols;
95 pdsch.mcs_table = mcs_table;
96 pdsch.tb_scaling_field = tb_scaling_field;
97 pdsch.nof_layers = nof_layers;
98 pdsch.max_nof_cws_scheduled_by_dci = 1;
99
100 return pdsch;
101}
x_overhead
xOverhead options, as per TS 38.331. Used in PDSCH-ServingCellConfig and PUSCH-ServingCellConfig.
Definition serving_cell_config.h:44
pdsch_mcs_table
Modulation and Code Scheme table identifiers for PDSCH.
Definition pdsch_mcs.h:33
dmrs_information make_dmrs_info_common(const pdsch_time_domain_resource_allocation &pdsch_td_cfg, pci_t pci, dmrs_typeA_position dmrs_typeA_pos)
Definition dmrs_helpers.h:56
Definition sch_pdu_builder.h:35
optional< pdsch_serving_cell_config > pdsch_serv_cell_cfg
pdsch-ServingCellConfig.
Definition serving_cell_config.h:258

◆ get_pdsch_config_f1_0_tc_rnti()

pdsch_config_params srsran::get_pdsch_config_f1_0_tc_rnti ( const cell_configuration & cell_cfg,
const pdsch_time_domain_resource_allocation & pdsch_td_cfg )

Fetches the PDSCH parameters needed for PDSCH PDU for DCI format 1_0, scrambled by TC-RNTI.

Returns parameters needed to compute the number of PRBs, MCS and TBS.

52{
53 static constexpr pdsch_mcs_table mcs_table = pdsch_mcs_table::qam64;
54 // As per TS 38.214, Section 5.1.3.2, TB scaling filed can be different to 0 only for DCI 1_0 with P-RNTI, or RA-RNTI.
55 static constexpr unsigned tb_scaling_field = 0;
56 // As per TS 38.214, Section 5.1.3.2, nof_oh_prb by \c xOverhead, defined in \c PDSCH-ServingCellConfig, TS 38.331; it
57 // is in the dedicated resources, configured the after DCI Format 1-0 TC-RNTI is used. Hence, nof_oh_prb is here set
58 // as 0.
59 static constexpr unsigned nof_oh_prb = 0;
60 static constexpr unsigned nof_layers = 1;
61
63
64 pdsch.dmrs = make_dmrs_info_common(pdsch_td_cfg, cell_cfg.pci, cell_cfg.dmrs_typeA_pos);
65
66 pdsch.nof_oh_prb = nof_oh_prb;
67 pdsch.symbols = pdsch_td_cfg.symbols;
68 pdsch.mcs_table = mcs_table;
69 pdsch.tb_scaling_field = tb_scaling_field;
70 pdsch.nof_layers = nof_layers;
71 pdsch.max_nof_cws_scheduled_by_dci = 1;
72
73 return pdsch;
74}

◆ get_pdsch_config_f1_1_c_rnti()

pdsch_config_params srsran::get_pdsch_config_f1_1_c_rnti ( const ue_cell_configuration & ue_cell_cfg,
const pdsch_time_domain_resource_allocation & pdsch_td_cfg,
unsigned nof_layers )

Fetches the PDSCH parameters needed for PUSCH PDU for DCI format 1_1, scrambled by C-RNTI.

Returns parameters needed to compute the number of PRBs, MCS and TBS.

106{
107 // As per TS 38.214, Section 5.1.3.2, TB scaling filed can be different to 0 only for DCI 1_0 with P-RNTI, or RA-RNTI.
108 static constexpr unsigned tb_scaling_field = 0;
109
110 // TODO: Update the value based on nof. CWs enabled.
111 static const bool are_both_cws_enabled = false;
112
114
115 srsran_assert(ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg->pdsch_mapping_type_a_dmrs.has_value(),
116 "No DMRS configured in PDSCH configuration");
117 pdsch.dmrs =
118 make_dmrs_info_dedicated(pdsch_td_cfg,
119 ue_cell_cfg.cell_cfg_common.pci,
120 ue_cell_cfg.cell_cfg_common.dmrs_typeA_pos,
121 ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg->pdsch_mapping_type_a_dmrs.value(),
122 nof_layers,
123 ue_cell_cfg.cell_cfg_common.dl_carrier.nof_ant,
125
126 // According to TS 38.214, Section 5.1.3.2, nof_oh_prb is set equal to xOverhead, when set; else nof_oh_prb = 0.
127 // NOTE: x_overhead::not_set is mapped to 0.
128 pdsch.nof_oh_prb = ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.has_value()
129 ? static_cast<unsigned>(ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.value().x_ov_head)
130 : static_cast<unsigned>(x_overhead::not_set);
131
132 pdsch.symbols = pdsch_td_cfg.symbols;
133 pdsch.mcs_table = ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg->mcs_table;
134 pdsch.tb_scaling_field = tb_scaling_field;
135 pdsch.nof_layers = nof_layers;
136 pdsch.max_nof_cws_scheduled_by_dci =
137 ue_cell_cfg.cfg_dedicated().init_dl_bwp.pdsch_cfg->is_max_cw_sched_by_dci_is_two ? 2 : 1;
138
139 return pdsch;
140}

◆ get_prach_duration_info()

prach_symbols_slots_duration srsran::get_prach_duration_info ( const prach_configuration & prach_cfg,
subcarrier_spacing pusch_scs )

Compute PRACH preamble duration information.

Parameters
[in]prach_cfgPRACH preamble configuration.
[in]pusch_scsPUSCH SCS that is used as a reference for symbol and slot unit.
Returns
PRACH preamble duration information.
194{
195 srsran_assert(pusch_scs == subcarrier_spacing::kHz15 or pusch_scs == subcarrier_spacing::kHz30,
196 "Only SCS 15kHz and 30kHz supported");
197
199
200 // With SCS 15kHz and 30kHz, only normal CP is supported.
201 static const unsigned nof_symbols_per_slot = NOF_OFDM_SYM_PER_SLOT_NORMAL_CP;
202 static const double symbol_duration_msec =
203 (double)SUBFRAME_DURATION_MSEC / (double)(get_nof_slots_per_subframe(pusch_scs) * nof_symbols_per_slot);
204
205 if (is_long_preamble(prach_cfg.format)) {
206 // Derive PRACH subcarrier spacing and other parameters.
208
209 const double length_msecs = (info.cp_length.to_seconds() + info.symbol_length.to_seconds()) * 1000;
210 output.nof_symbols = ceil(length_msecs / symbol_duration_msec);
211 // Map the starting symbol with from the SCS 15kHz FR1 reference for PRACH into PUSCH SCS.
213 prach_cfg.starting_symbol * (1U << to_numerology_value(pusch_scs));
214 // Start slot within the subframe. For FR1, the start_symbol_pusch_scs_in_subframe refers to the SCS 15kHz.
215 output.start_slot_pusch_scs = start_symbol_pusch_scs_in_subframe / nof_symbols_per_slot;
216 output.start_symbol_pusch_scs = start_symbol_pusch_scs_in_subframe % nof_symbols_per_slot;
217 output.prach_length_slots =
218 static_cast<unsigned>(ceil(static_cast<double>(output.start_symbol_pusch_scs + output.nof_symbols) /
219 (static_cast<double>(nof_symbols_per_slot))));
220 } else {
221 const prach_subcarrier_spacing prach_scs = to_ra_subcarrier_spacing(pusch_scs);
222 output.nof_symbols = static_cast<unsigned>(prach_cfg.nof_occasions_within_slot * prach_cfg.duration);
223 // Starting slot within the subframe; this can be derived from Section 5.3.2, TS 38.211.
224 const bool prach_starts_in_even_slot =
225 prach_scs == prach_subcarrier_spacing::kHz15 or
226 (prach_scs == prach_subcarrier_spacing::kHz30 and prach_cfg.nof_prach_slots_within_subframe != 1);
227 output.start_slot_pusch_scs = prach_starts_in_even_slot ? 0U : 1U;
228 // The burst of PRACH opportunities for short PRACH formats can be over 1 or 2 slots, as per Section 5.3.2, and
229 // Tables 6.3.3.2-2 and 6.3.3.2-3, TS 38.211.
230 output.prach_length_slots =
231 prach_scs == prach_subcarrier_spacing::kHz30 and prach_cfg.nof_prach_slots_within_subframe != 1 ? 2U : 1U;
232 }
233
234 return output;
235}
prach_subcarrier_spacing
Random Access subcarrier spacing.
Definition prach_subcarrier_spacing.h:31
constexpr prach_subcarrier_spacing to_ra_subcarrier_spacing(subcarrier_spacing scs)
Adapts common resource grid subcarrier spacing to RA subcarrier spacing.
Definition prach_subcarrier_spacing.h:101
constexpr uint32_t SUBFRAME_DURATION_MSEC
Duration of a subframe in milliseconds.
Definition slot_point.h:38
prach_preamble_information get_prach_preamble_long_info(prach_format_type format)
Get long PRACH preamble information as per TS38.211 Table 6.3.3.1-1.
Definition prach_preamble_information.cpp:30
uint8_t starting_symbol
Starting OFDM symbol index.
Definition prach_configuration.h:50
uint8_t duration
PRACH duration in symbols. Only valid for short preamble formats.
Definition prach_configuration.h:56
uint8_t nof_prach_slots_within_subframe
Number of PRACH slots within a subframe. Set zero for reserved.
Definition prach_configuration.h:52
Collects PRACH preamble information parameters.
Definition prach_preamble_information.h:36
Collects PRACH preamble duration information.
Definition prach_preamble_information.h:86

◆ get_prach_preamble_long_info()

prach_preamble_information srsran::get_prach_preamble_long_info ( prach_format_type format)

Get long PRACH preamble information as per TS38.211 Table 6.3.3.1-1.

An assertion is triggered if the PRACH preamble format is short.

Parameters
[in]formatPRACH preamble format.
Returns
PRACH preamble information.
31{
32 srsran_assert(is_long_preamble(format), "Invalid preamble format. It must be a long preamble.");
33 switch (format) {
34 case prach_format_type::zero:
35 return {839U,
36 prach_subcarrier_spacing::kHz1_25,
39 true};
40 case prach_format_type::one:
41 return {839U,
42 prach_subcarrier_spacing::kHz1_25,
45 true};
46 case prach_format_type::two:
47 return {839U,
48 prach_subcarrier_spacing::kHz1_25,
51 true};
52 case prach_format_type::three:
53 default:
54 return {839U,
55 prach_subcarrier_spacing::kHz5,
58 true};
59 }
60}
static constexpr phy_time_unit from_units_of_kappa(unsigned units_of_kappa)
Creates a physical layer time from units of .
Definition phy_time_unit.h:203

◆ get_prach_preamble_short_info()

prach_preamble_information srsran::get_prach_preamble_short_info ( prach_format_type format,
prach_subcarrier_spacing ra_scs,
bool last_occasion )

Get short PRACH preamble information as per TS38.211 Table 6.3.3.1-2.

An assertion is triggered if:

  • the PRACH preamble format is long, or
  • the random access subcarrier spacing does not satisfy $\Delta f ^\textup{RA} = 15 \cdot 2^\mu$ where $\mu
\in \{0, 1, 2, 3\}$.
Parameters
[in]formatPRACH preamble format.
[in]ra_scsRandom access subcarrier spacing $\Delta f ^\textup{RA}$.
[in]last_occasionSet to true if $n_\textup{t}^\textup{RA}=N_\textup{t}^\textup{RA,slot}-1$
Returns
PRACH preamble information.
64{
65 srsran_assert(is_short_preamble(format) && is_short_preamble(ra_scs),
66 "The preamble format (i.e., {}) is not short or subcarrier spacing (i.e., {}) is not compatible with "
67 "short preambles.",
68 to_string(format),
69 to_string(ra_scs));
70
72 info.sequence_length = 139U;
73 info.scs = ra_scs;
74 info.support_restricted_sets = false;
75
76 unsigned numerology = to_numerology_value(ra_scs);
91
92 switch (format) {
93 case prach_format_type::A1:
94 info.symbol_length = symbol_length_x1_kappa;
95 info.cp_length = cp_length_A1_kappa;
96 break;
97 case prach_format_type::A2:
98 info.symbol_length = symbol_length_x2_kappa;
99 info.cp_length = cp_length_A2_kappa;
100 break;
101 case prach_format_type::A3:
102 info.symbol_length = symbol_length_x3_kappa;
103 info.cp_length = cp_length_A3_kappa;
104 break;
105 case prach_format_type::B1:
106 info.symbol_length = symbol_length_x1_kappa;
107 info.cp_length = cp_length_B1_kappa;
108 break;
109 case prach_format_type::B4:
110 info.symbol_length = symbol_length_x4_kappa;
111 info.cp_length = cp_length_B4_kappa;
112 break;
113 case prach_format_type::C0:
114 info.symbol_length = symbol_length_x0_kappa;
115 info.cp_length = cp_length_C0_kappa;
116 break;
117 case prach_format_type::C2:
118 info.symbol_length = symbol_length_x2_kappa;
119 info.cp_length = cp_length_C2_kappa;
120 break;
121 case prach_format_type::A1_B1:
122 info.symbol_length = symbol_length_x1_kappa;
124 break;
125 case prach_format_type::A2_B2:
126 info.symbol_length = symbol_length_x2_kappa;
128 break;
129 case prach_format_type::A3_B3:
130 default:
131 info.symbol_length = symbol_length_x3_kappa;
133 break;
134 }
135 return info;
136}
Physical layer time unit.
Definition phy_time_unit.h:34
constexpr bool is_short_preamble(prach_format_type type)
Checks if the preamble format is short.
Definition prach_format_type.h:114

◆ get_prach_window_duration()

phy_time_unit srsran::get_prach_window_duration ( srsran::prach_format_type format,
srsran::subcarrier_spacing pusch_scs,
unsigned start_symbol_index,
unsigned nof_td_occasions )

Gets the PRACH window duration.

Parameters
[in]formatPRACH preamble format.
[in]pusch_scsUplink resource grid subcarrier spacing. Determines the numerology $\mu$.
[in]start_symbol_indexOFDM symbol index within the slot that marks the start of the acquisition window for the first time-domain PRACH occasion.
[in]nof_td_occasionsNumber of time-domain occasions within a PRACH window.
Returns
The PRACH window duration from the beginning of the slot to the end of the last time-domain occasion.
Note
The RA subcarrier spacing for short preambles is assumed to be equal to the uplink resource grid subcarrier spacing.
142{
143 // Cyclic prefix extension for short preambles at 0 and 0.5 ms from the start of the subframe.
145
146 // PUSCH symbol duration, it assumes that RA SCS and PUSCH SCS are the same for short preambles.
148 if (is_short_preamble(format)) {
150 }
151
152 // Calculate time-domain occasion start time.
153 phy_time_unit t_start = pusch_symbol_duration * start_symbol_index;
154
155 // Add sixteen kappa units if the symbol doesn't start at the beginning of the slot.
158 }
159
160 // Add sixteen kappa units if the symbol starts more than 0.5 ms after the beginning of the slot.
161 if (t_start > phy_time_unit::from_seconds(0.5e-3)) {
163 }
164
165 // If the preamble format is short...
167 if (is_short_preamble(format)) {
170
171 // Add sixteen kappa to the cyclic prefix length if ...
172 // The window overlaps with time zero.
175 }
176
177 // The window overlaps with time 0.5ms from the beginning of the slot.
180 }
181 } else {
183 t_end = t_start + preamble_info.cp_length + preamble_info.symbol_length;
184
185 // Round to t_end to the next subframe for long preambles.
186 t_end = phy_time_unit::from_seconds(1e-3 * std::ceil(t_end.to_seconds() * 1e3));
187 }
188
189 return t_end;
190}
static constexpr phy_time_unit from_seconds(double seconds)
Creates a physical layer time from seconds.
Definition phy_time_unit.h:221
constexpr unsigned pow2(unsigned power)
Calculates the integer power of 2.
Definition math_utils.h:62
unsigned get_preamble_duration(prach_format_type format)
Gets the PRACH time-domain occasion duration in symbols relative to the RA subcarrier spacing.
Definition prach_format_type.h:126
phy_time_unit cp_length
Parameter . Expressed in units of the reference symbol time .
Definition prach_preamble_information.h:44
phy_time_unit symbol_length
Parameter . Expressed in units of the reference symbol time .
Definition prach_preamble_information.h:42

◆ get_preamble_duration()

unsigned srsran::get_preamble_duration ( prach_format_type format)
inline

Gets the PRACH time-domain occasion duration in symbols relative to the RA subcarrier spacing.

Corresponds to parameter $N_\textup{dur}^\textup{RA}$ is TS38.211 Section 5.3.2. It is selected from TS38.211 Tables 6.3.3.2-2, 6.3.3.2-3 and 6.3.3.2-4.

Parameters
[in]formatPRACH preamble format.
Returns
The PRACH time-domain occasion duration for short PRACH formats, and 0 otherwise.
127{
128 switch (format) {
129 case prach_format_type::zero:
130 case prach_format_type::one:
131 case prach_format_type::two:
132 case prach_format_type::three:
133 case prach_format_type::invalid:
134 default:
135 return 0;
136 case prach_format_type::A1:
137 case prach_format_type::B1:
138 case prach_format_type::A1_B1:
139 case prach_format_type::C0:
140 return 2;
141 case prach_format_type::A2:
142 case prach_format_type::A2_B2:
143 return 4;
144 case prach_format_type::A3:
145 case prach_format_type::A3_B3:
146 case prach_format_type::C2:
147 return 6;
148 case prach_format_type::B4:
149 return 12;
150 }
151}

◆ get_priority_queue_policy()

template<concurrent_queue_policy... QueuePolicies>
constexpr concurrent_queue_policy srsran::get_priority_queue_policy ( enqueue_priority Priority)
constexpr

Gets the queue policy for a given priority.

843{
844 constexpr std::array<concurrent_queue_policy, sizeof...(QueuePolicies)> policies{QueuePolicies...};
845 return policies[detail::enqueue_priority_to_queue_index(Priority, sizeof...(QueuePolicies))];
846}
concurrent_queue_policy
Types of concurrent queues. They differ in type of synchronization mechanism and number of producers/...
Definition concurrent_queue.h:45

◆ get_pucch_default_cyclic_shift()

unsigned srsran::get_pucch_default_cyclic_shift ( unsigned r_pucch,
unsigned nof_cs )

Gets the PUCCH cyclic shift for PUCCH resource before dedicated PUCCH as per TS38.213 Section 9.2.1.

Parameters
[in]r_pucchPUCCH resource index, parameter $r_{PUCCH}$.
[in]nof_csNumber of cyclic shifts, parameter $N_{CS}$.
Returns
The PUCCH resource cyclic shift.
48{
49 srsran_assert(r_pucch < 16, "The PUCCH resource index {} exceeds the maximum allowed {}.", r_pucch, 16);
50 srsran_assert(nof_cs > 0, "The number of cyclic shift must be greater than zero.");
51 unsigned result = r_pucch % nof_cs;
52 if (r_pucch > 8) {
53 result = (r_pucch - 8) % nof_cs;
54 }
55 return result;
56}

◆ get_pucch_default_prb_index()

std::pair< unsigned, unsigned > srsran::get_pucch_default_prb_index ( unsigned r_pucch,
unsigned rb_bwp_offset,
unsigned nof_cs,
unsigned N_bwp_size )

Gets the PRB indexes for PUCCH resource before dedicated PUCCH as per TS38.213 Section 9.2.1.

Parameters
[in]r_pucchPUCCH resource index, parameter $r_{PUCCH}$.
[in]rb_bwp_offsetPRB offset, parameter $RB_{BWP}^{offset}$.
[in]nof_csNumber of cyclic shifts, parameter $N_{CS}$.
[in]N_bwp_sizeBWP size, parameter $N_{BWP}^{size}$.
Returns
A pair of values containing the PRB index for the first and second hops.
34{
35 srsran_assert(r_pucch < 16, "The PUCCH resource index {} exceeds the maximum allowed {}.", r_pucch, 16);
36
37 unsigned prb_index_first = rb_bwp_offset + (r_pucch / nof_cs);
38 unsigned prb_index_second = N_bwp_size - 1 - prb_index_first;
39 if (r_pucch / 8 == 1) {
40 prb_index_second = rb_bwp_offset + ((r_pucch - 8) / nof_cs);
41 prb_index_first = N_bwp_size - 1 - prb_index_second;
42 }
43
45}

◆ get_pucch_default_resource()

pucch_default_resource srsran::get_pucch_default_resource ( unsigned row_index,
unsigned N_bwp_size )

Gets the PUCCH resource parameters before dedicated PUCCH resources are configured.

The values are given by TS38.213 Table 9.2.1-1.

Parameters
[in]row_indexPUCCH default row index, higher layer parameter pucch-ResourceCommon (TS38.331 Section 6.3.2, Information Element PUCCH-ConfigCommon). Possible values are {0, ... , 15}.
[in]bwp_sizeActive BWP size, parameter $N_{BWP}^{size}$ in TS38.213 Section 9.2.1.
Returns
A valid default PUCCH resource.
Remarks
An assertion is triggered if the row index exceeds its boundaries.
59{
60 // TS38.213 Table 9.2.1-1.
61 static const std::array<pucch_default_resource, 16> table = {{{pucch_format::FORMAT_0, 12, 2, 0, {0, 3}},
62 {pucch_format::FORMAT_0, 12, 2, 0, {0, 4, 8}},
63 {pucch_format::FORMAT_0, 12, 2, 3, {0, 4, 8}},
64 {pucch_format::FORMAT_1, 10, 4, 0, {0, 6}},
65 {pucch_format::FORMAT_1, 10, 4, 0, {0, 3, 6, 9}},
66 {pucch_format::FORMAT_1, 10, 4, 2, {0, 3, 6, 9}},
67 {pucch_format::FORMAT_1, 10, 4, 4, {0, 3, 6, 9}},
68 {pucch_format::FORMAT_1, 4, 10, 0, {0, 6}},
69 {pucch_format::FORMAT_1, 4, 10, 0, {0, 3, 6, 9}},
70 {pucch_format::FORMAT_1, 4, 10, 2, {0, 3, 6, 9}},
71 {pucch_format::FORMAT_1, 4, 10, 4, {0, 3, 6, 9}},
72 {pucch_format::FORMAT_1, 0, 14, 0, {0, 6}},
73 {pucch_format::FORMAT_1, 0, 14, 0, {0, 3, 6, 9}},
74 {pucch_format::FORMAT_1, 0, 14, 2, {0, 3, 6, 9}},
75 {pucch_format::FORMAT_1, 0, 14, 4, {0, 3, 6, 9}},
76 {pucch_format::FORMAT_1, 0, 14, 0, {0, 3, 6, 9}}}};
77
78 srsran_assert(
79 index < table.size(), "PUCCH resource index {} exceeds the number of elements {}.", index, table.size());
80 pucch_default_resource result = table[index];
81
82 // Handle PRB offset for index 15.
83 if (index == 15) {
84 result.rb_bwp_offset = N_bwp_size / 4;
85 }
86
87 return result;
88}
Collects the default PUCCH resource parameters given by TS38.213 Table 9.2.1-1.
Definition pucch_default_resource.h:38

◆ get_pucch_default_resource_index()

unsigned srsran::get_pucch_default_resource_index ( unsigned n_cce,
unsigned nof_cce,
unsigned delta_pri )

Calculates the default PUCCH resource index $r_{PUCCH}$.

It implemented is according to TS38.213 Section 9.2.1.

Parameters
[in]n_cceIndex of the first CCE for the PDCCH reception, parameter $n_{CCE,0}$.
[in]nof_cceNumber of CCEs in a CORESET of the PDCCH reception with DCI associated to the PUCCH transmission, Parameter $N_{CCE}$.
[in]delta_priPUCCH resource indicator field in the associated DCI, parameter $\Delta _{PRI}$.
Returns
PUCCH resource index in with a range of {0, ..., 15}.

◆ get_pucch_format2_E_total()

unsigned srsran::get_pucch_format2_E_total ( unsigned nof_prb,
unsigned nof_symbols )
inline

Calculates the total rate matching output sequence length $E_{UCI}$, as per Table 6.3.1.4-1 TS 38.212.

33{
34 return 16U * nof_symbols * nof_prb;
35}

◆ get_pucch_format2_max_nof_prbs()

unsigned srsran::get_pucch_format2_max_nof_prbs ( unsigned nof_payload_bits,
unsigned nof_symbols,
float max_code_rate )
inline

Calculates the number of PRBs required for a given payload size for PUCCH format 2.

Parameters
[in]nof_payload_bitsTotal number of payload bits.
[in]nof_symbolsTransmission duration in symbols.
[in]max_code_rateMaximum code rate for PUCCH format 2; it corresponds to maxCodeRate, part of PUCCH-FormatConfig, TS 38.331.
Returns
The number of PRBs required for the transmission of nof_payload_bits with PUCCH format 2.
Remarks
The returned number of PRBs is not capped to the maximum value of FORMAT2_MAX_NPRB; it's up to the caller to perform this check.
69{
70 if (nof_payload_bits == 0 or nof_symbols == 0) {
71 return 0;
72 }
73
74 // We compute \ref e_uci using the max PRBs, as we don't know the actual nof PRBs (computing this is the objective of
75 // this function). NOTE: as per Table 6.3.1.4-1 and Table 6.3.1.4.1-1, TS 38.212, the maximum value of \f$E_{UCI}\f$
76 // for PUCCH Format 2 is 512. As per Section 6.3.1.2.1, TS 38.212, any value less than 1088 is irrelevant for the CRC
77 // length computation, therefore using the maximum number of PRBs instead of the actual number doesn't affect the
78 // result.
79 const unsigned max_nof_pucch_f2_prbs = 16;
80 const unsigned e_uci = get_pucch_format2_E_total(max_nof_pucch_f2_prbs, nof_symbols);
81
82 // As per Sections 6.3.1.2.1 and 6.3.1.4.1, TS 38.212, the parameter \f$E\f$ used to derive the number of
83 // code-blocks is \f$E_{UCI}\f$.
84 const unsigned payload_plus_crc_bits = nof_payload_bits + get_uci_nof_crc_bits(nof_payload_bits, e_uci);
85
86 const unsigned NOF_BITS_QPSK_SYMBOL = 2;
87 // This is derived from the inequality (or constraint) on \f$M^{PUCCH}_{RB,min}\f$, in Section 9.2.5.1, TS 38.213. The
88 // ceil operation guarantees that the number of PRBs is enough to satisfy the effective code rate constraint.
89 return static_cast<unsigned>(std::ceil(
90 static_cast<float>(payload_plus_crc_bits) /
91 (static_cast<float>(pucch_constants::FORMAT2_NOF_DATA_SC * nof_symbols * NOF_BITS_QPSK_SYMBOL) * max_code_rate)));
92}

◆ get_pucch_format2_max_payload()

unsigned srsran::get_pucch_format2_max_payload ( unsigned max_nof_prbs,
unsigned nof_symbols,
float max_code_rate )
inline

Calculates the maximum payload for a PUCCH Format 2 transmission.

Parameters
[in]nof_prbTransmission bandwidth in PRB.
[in]nof_symbolsTransmission duration in symbols.
[in]max_code_rateMaximum allowed PUCCH Format2 code rate.
Returns
The maximum payload for a PUCCH Format 2 transmission.
129{
130 const unsigned NOF_BITS_QPSK_SYMBOL = 2;
131 // This is derived from the inequality (or constraint) on \f$M^{PUCCH}_{RB,min}\f$, in Section 9.2.5.1, TS 38.213; the
132 // max payloads is obtained by using the floor operation from the maximum PHY capacity, given the PRBs, symbols and
133 // max_code_rate.
134 // NOTE: The maximum number of bits that can be carried by a PUCCH Format 2 resource is 409, which is obtained for 16
135 // PRBs, 2 symbols and 0.8 max code rate.
136 unsigned estimated_pucch_f2_capacity = static_cast<unsigned>(std::floor(
137 static_cast<float>(pucch_constants::FORMAT2_NOF_DATA_SC * nof_symbols * NOF_BITS_QPSK_SYMBOL * max_nof_prbs) *
138 max_code_rate));
139
140 // Get the payload depending on the estimated PUCCH F2 capacity (which we define as the nof bits that the PUCCH F2 can
141 // carry).
142 // NOTE: Given the max capacity of PUCCH, which is 409 bits (see above), the UCI in PUCCH F2 can have max 1 codeword
143 // (as per Section 6.3.1.2.1, TS 38.212); this implies only 6-bit and 11-bit can be added as CRC to the PUCCH F2
144 // payload.
145
146 // Case: no CRC for payload <= 11 bits.
147 const unsigned min_capacity_for_more_than_11_bit_payload = 18U;
148 const unsigned max_payload_without_crc_addition = 11U;
149 if (estimated_pucch_f2_capacity < min_capacity_for_more_than_11_bit_payload) {
150 return std::min(estimated_pucch_f2_capacity, max_payload_without_crc_addition);
151 }
152 // Case: 6-bit CRC for 12 <= payload <= 19 bits.
153 const unsigned min_capacity_for_more_than_19_bit_payload = 31U;
154 const unsigned max_payload_with_6_bit_crc_addition = 19U;
155 const unsigned short_crc_length = 6U;
156 if (estimated_pucch_f2_capacity < min_capacity_for_more_than_19_bit_payload) {
157 return std::min(estimated_pucch_f2_capacity - short_crc_length, max_payload_with_6_bit_crc_addition);
158 }
159
160 // Case: 11-bit CRC for payload >= 20.
161 const unsigned long_crc_length = 11U;
162 return estimated_pucch_f2_capacity - long_crc_length;
163}

◆ get_pucch_format2_nof_prbs()

unsigned srsran::get_pucch_format2_nof_prbs ( unsigned nof_payload_bits,
unsigned max_nof_prbs,
unsigned nof_symbols,
float max_code_rate )
inline

Calculates the num. of PRBs (capped to the configured max nof PRBs) given the PUCCH Format 2 payload size.

With respect to get_pucch_format2_max_nof_prbs, this function caps the number of PRBs to the value configured for PUCCH resource Format 2, which can be less than 16. Note that the returned number of PRBs might not be enough to allocate the payload size.

Parameters
[in]nof_payload_bitsTotal number of payload bits.
[in]max_nof_prbsMaximum PUCCH format 2 bandwidth in PRB; it corresponds to nrofPRBs, part of PUCCH-format2, TS 38.331.
[in]nof_symbolsTransmission duration in symbols.
[in]max_code_rateMaximum code rate for PUCCH format 2; it corresponds to maxCodeRate, part of PUCCH-FormatConfig, TS 38.331.
Returns
The number of PRBs for the PUCCH format 2 resource. Note that the returned number of PRBs might not be enough to allocate the payload size; it's the caller's responsibility to perform this check.
110{
111 if (nof_payload_bits == 0 or nof_symbols == 0) {
112 return 0;
113 }
114 if (max_nof_prbs == 1) {
115 return 1;
116 }
117
118 const unsigned estimated_nof_prbs = get_pucch_format2_max_nof_prbs(nof_payload_bits, nof_symbols, max_code_rate);
119
120 return std::min(estimated_nof_prbs, max_nof_prbs);
121}
unsigned get_pucch_format2_max_nof_prbs(unsigned nof_payload_bits, unsigned nof_symbols, float max_code_rate)
Calculates the number of PRBs required for a given payload size for PUCCH format 2.
Definition pucch_info.h:68

◆ get_pusch_config_f0_0_c_rnti()

pusch_config_params srsran::get_pusch_config_f0_0_c_rnti ( const ue_cell_configuration & ue_cell_cfg,
const bwp_uplink_common & ul_bwp,
const pusch_time_domain_resource_allocation & pusch_td_cfg,
const unsigned nof_harq_ack_bits,
bool is_csi_report_slot )

Fetches the PUSCH parameters needed for PUSCH PDU for DCI format 0_0, scrambled by C-RNTI.

The parameters returned by this function are needed to compute the number of PRBs, MCS and TBS.

182{
183 const pusch_mcs_table mcs_table = pusch_mcs_table::qam64;
184 constexpr unsigned nof_layers = 1;
185 // As per TS 38.214, Section 5.1.3.2 and 6.1.4.2, and TS 38.212, Section 7.3.1.1 and 7.3.1.2, TB scaling filed is only
186 // used for DCI Format 1-0 (in the DL). Therefore, for the PUSCH this is set to 0.
187 constexpr unsigned tb_scaling_field = 0;
188 // Parameter \c tp-pi2BPSK enabled is not supported yet.
189 constexpr bool tp_pi2bpsk_present = false;
190
192
193 pusch.dmrs =
194 make_dmrs_info_common(pusch_td_cfg, ue_cell_cfg.cell_cfg_common.pci, ue_cell_cfg.cell_cfg_common.dmrs_typeA_pos);
195
196 pusch.symbols = pusch_td_cfg.symbols;
197
198 pusch.mcs_table = mcs_table;
199 pusch.nof_layers = nof_layers;
200 pusch.tp_pi2bpsk_present = tp_pi2bpsk_present;
201 pusch.tb_scaling_field = tb_scaling_field;
202
203 // According to TS 38.214, Section 6.1.4.2, nof_oh_prb is set equal to xOverhead, when set; else nof_oh_prb = 0.
204 // NOTE: x_overhead::not_set is mapped to 0.
205 pusch.nof_oh_prb = ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.has_value()
206 ? static_cast<unsigned>(ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.value().x_ov_head)
207 : static_cast<unsigned>(x_overhead::not_set);
208
209 // TODO: verify if this needs to be set depending on some configuration.
210 pusch.nof_harq_ack_bits = nof_harq_ack_bits;
211 if (is_csi_report_slot) {
212 csi_report_configuration csi_rep_cfg =
213 create_csi_report_configuration(ue_cell_cfg.cfg_dedicated().csi_meas_cfg.value());
214 // NOTE: The CSI size depends on whether the CSI is configured on PUSCH or PUCCH, as per Section 5.2.3, TS 38.214:
215 // "For both Type I and Type II reports configured for PUCCH but transmitted on PUSCH, the determination of the
216 // payload for CSI part 1 and CSI part 2 follows that of PUCCH as described in clause 5.2.4."
217 if (is_pusch_configured(ue_cell_cfg.cfg_dedicated().csi_meas_cfg.value())) {
219 pusch.nof_csi_part1_bits = csi_size.part1_size.value();
220 pusch.max_nof_csi_part2_bits = csi_size.part2_max_size.value();
221 } else {
222 pusch.nof_csi_part1_bits = get_csi_report_pucch_size(csi_rep_cfg).value();
223 }
224 }
225
226 return pusch;
227}
csi_report_pusch_size get_csi_report_pusch_size(const csi_report_configuration &config)
Calculates the Channel State Information (CSI) payload sizes when the CSI report is transmitted in PU...
Definition csi_report_on_pusch_helpers.cpp:190
csi_report_configuration create_csi_report_configuration(const csi_meas_config &csi_meas)
Returns the Chanel State Information (CSI) report configuration parameters based on CSI-MeasConfig.
Definition csi_report_config_helpers.cpp:28
bool is_pusch_configured(const csi_meas_config &csi_meas)
Tells whether the CSI report is configured for PUSCH.
Definition csi_report_config_helpers.cpp:125
units::bits get_csi_report_pucch_size(const csi_report_configuration &config)
Gets the Channel State Information (CSI) report size when the CSI report is transmitted in PUCCH.
Definition csi_report_on_pucch_helpers.cpp:188
pusch_mcs_table
Modulation and Code Scheme table identifiers for PUSCH.
Definition pusch_mcs.h:33
Definition sch_pdu_builder.h:47
optional< csi_meas_config > csi_meas_cfg
CSI-MeasConfig.
Definition serving_cell_config.h:260

◆ get_pusch_config_f0_0_tc_rnti()

pusch_config_params srsran::get_pusch_config_f0_0_tc_rnti ( const cell_configuration & cell_cfg,
const pusch_time_domain_resource_allocation & pusch_td_cfg )

Fetches the PUSCH parameters needed for PUSCH PDU for DCI format 0_0, scrambled by TC-RNTI.

The parameters returned by this function are needed to compute the number of PRBs, MCS and TBS.

144{
145 constexpr pusch_mcs_table mcs_table = pusch_mcs_table::qam64;
146 constexpr unsigned nof_layers = 1;
147 // As per TS 38.214, Section 6.1.4.2, nof_oh_prb by \c xOverhead, defined in \c PUSCH-ServingCellConfig, TS 38.331; it
148 // is in the dedicated resources, configured the after DCI Format 0-0 TC-RNTI is used. Hence, nof_oh_prb is here set
149 // as 0.
150 static constexpr unsigned nof_oh_prb = 0;
151 // As per TS 38.214, Section 5.1.3.2 and 6.1.4.2, and TS 38.212, Section 7.3.1.1 and 7.3.1.2, TB scaling filed is only
152 // used for DCI Format 1-0 (in the DL). Therefore, for the PUSCH this is set to 0.
153 constexpr unsigned tb_scaling_field = 0;
154 // Parameter \c tp-pi2BPSK enabled is not supported yet.
155 constexpr bool tp_pi2bpsk_present = false;
156 // As with 1 or 2 bits the corresponding beta-offset won't change, we can over-allocate the number of HARQ-ACK bits
157 // to 2.
158 constexpr unsigned nof_harq_ack_bits = 2;
159
161
162 pusch.dmrs = make_dmrs_info_common(pusch_td_cfg, cell_cfg.pci, cell_cfg.dmrs_typeA_pos);
163
164 pusch.symbols = pusch_td_cfg.symbols;
165
166 pusch.mcs_table = mcs_table;
167 pusch.nof_layers = nof_layers;
168 pusch.tp_pi2bpsk_present = tp_pi2bpsk_present;
169 pusch.tb_scaling_field = tb_scaling_field;
170
171 pusch.nof_oh_prb = nof_oh_prb;
172 pusch.nof_harq_ack_bits = nof_harq_ack_bits;
173
174 return pusch;
175}

◆ get_pusch_config_f0_1_c_rnti()

pusch_config_params srsran::get_pusch_config_f0_1_c_rnti ( const ue_cell_configuration & ue_cell_cfg,
const pusch_time_domain_resource_allocation & pusch_td_cfg,
unsigned nof_layers,
const unsigned nof_harq_ack_bits,
bool is_csi_report_slot )

Fetches the PUSCH parameters needed for PUSCH PDU for DCI format 0_1, scrambled by C-RNTI.

The parameters returned by this function are needed to compute the number of PRBs, MCS and TBS.

234{
235 const pusch_mcs_table mcs_table = ue_cell_cfg.cfg_dedicated().ul_config->init_ul_bwp.pusch_cfg->mcs_table;
236 // As per TS 38.214, Section 5.1.3.2 and 6.1.4.2, and TS 38.212, Section 7.3.1.1 and 7.3.1.2, TB scaling filed is only
237 // used for DCI Format 1-0 (in the DL). Therefore, for the PUSCH this is set to 0.
238 constexpr unsigned tb_scaling_field = 0;
239 // Parameter \c tp-pi2BPSK enabled is not supported yet.
240 constexpr bool tp_pi2bpsk_present = false;
241 // TODO: Update the value based on nof. CWs enabled.
242 static const bool are_both_cws_enabled = false;
243
245
246 // TODO: Consider DMRS configured in PUSCH-Config. Need helpers from Phy.
247 srsran_assert(ue_cell_cfg.cfg_dedicated().ul_config->init_ul_bwp.pusch_cfg->pusch_mapping_type_a_dmrs.has_value(),
248 "No DMRS configured in PUSCH configuration");
249 pusch.dmrs = make_dmrs_info_dedicated(
251 ue_cell_cfg.cell_cfg_common.pci,
252 ue_cell_cfg.cell_cfg_common.dmrs_typeA_pos,
253 ue_cell_cfg.cfg_dedicated().ul_config->init_ul_bwp.pusch_cfg->pusch_mapping_type_a_dmrs.value(),
254 nof_layers,
255 ue_cell_cfg.cell_cfg_common.ul_carrier.nof_ant,
257
258 pusch.symbols = pusch_td_cfg.symbols;
259
260 pusch.mcs_table = mcs_table;
261 pusch.nof_layers = nof_layers;
262 pusch.tp_pi2bpsk_present = tp_pi2bpsk_present;
263 pusch.tb_scaling_field = tb_scaling_field;
264
265 // According to TS 38.214, Section 6.1.4.2, nof_oh_prb is set equal to xOverhead, when set; else nof_oh_prb = 0.
266 // NOTE: x_overhead::not_set is mapped to 0.
267 pusch.nof_oh_prb = ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.has_value()
268 ? static_cast<unsigned>(ue_cell_cfg.cfg_dedicated().pdsch_serv_cell_cfg.value().x_ov_head)
269 : static_cast<unsigned>(x_overhead::not_set);
270
271 // TODO: verify if this needs to be set depending on some configuration.
272 pusch.nof_harq_ack_bits = nof_harq_ack_bits;
273 if (is_csi_report_slot) {
274 csi_report_configuration csi_rep_cfg =
275 create_csi_report_configuration(ue_cell_cfg.cfg_dedicated().csi_meas_cfg.value());
276 // NOTE: The CSI size depends on whether the CSI is configured on PUSCH or PUCCH, as per Section 5.2.3, TS 38.214:
277 // "For both Type I and Type II reports configured for PUCCH but transmitted on PUSCH, the determination of the
278 // payload for CSI part 1 and CSI part 2 follows that of PUCCH as described in clause 5.2.4."
279 if (is_pusch_configured(ue_cell_cfg.cfg_dedicated().csi_meas_cfg.value())) {
281 pusch.nof_csi_part1_bits = csi_size.part1_size.value();
282 pusch.max_nof_csi_part2_bits = csi_size.part2_max_size.value();
283 } else {
284 pusch.nof_csi_part1_bits = get_csi_report_pucch_size(csi_rep_cfg).value();
285 }
286 }
287
288 return pusch;
289}
optional< uplink_config > ul_config
uplinkConfig, containing the UL configuration.
Definition serving_cell_config.h:256

◆ get_pusch_time_domain_resource_table()

span< const pusch_time_domain_resource_allocation > srsran::get_pusch_time_domain_resource_table ( const pusch_config_common & pusch_cfg)
inline

Retrieves the time resource allocation table for PUSCH.

Remarks
See TS 38.214, Section 6.1.2.1.1 - Determination of the resource allocation table to be used for PUSCH.
34{
35 if (pusch_cfg.pusch_td_alloc_list.empty()) {
36 // Use default tables 6.1.2.1.1-2/3.
37 // TODO: PHY helper.
38 }
39 return pusch_cfg.pusch_td_alloc_list;
40}
std::vector< pusch_time_domain_resource_allocation > pusch_td_alloc_list
PUSCH time domain resource allocations. Size: (0..maxNrofUL-Allocations=16).
Definition bwp_configuration.h:140

◆ get_ra_rnti()

uint16_t srsran::get_ra_rnti ( unsigned slot_index,
unsigned symbol_index,
unsigned frequency_index,
bool is_sul = false )

Computes the RA-RNTI based on PRACH parameters, as per TS 38.321, Section 5.1.3.

Parameters
[in]slot_indexIndex of the first slot of the PRACH occasion in a system frame. Values {0,...,79}.
[in]symbol_indexIndex of the first OFDM symbol of the first PRACH occasion. Values {0,...,13}.
[in]frequency_indexIndex of the PRACH occation in the frequency domain. Values {0,...,7}.
[in]is_sultrue is this is SUL carrier, false otherwise.
Returns
the RA-RNRI, as per , as per TS 38.321, Section 5.1.3.
56{
57 // See 38.321, 5.1.3 - Random Access Preamble transmission.
58 // RA-RNTI = 1 + s_id + 14 × t_id + 14 × 80 × f_id + 14 × 80 × 8 × ul_carrier_id.
59 // s_id = index of the first OFDM symbol of the (first, for short formats) PRACH occasion (0 <= s_id < 14).
60 // t_id = index of the first slot of the PRACH occasion in a system frame (0 <= t_id < 80); the numerology of
61 // reference for t_id is 15kHz for long PRACH Formats, regardless of the SCS common; whereas, for short PRACH formats,
62 // it coincides with SCS common (this can be inferred from Section 5.1.3, TS 38.321, and from Section 5.3.2,
63 // TS 38.211).
64 // f_id = index of the PRACH occation in the freq domain (0 <= f_id < 8).
65 // ul_carrier_id = 0 for NUL and 1 for SUL carrier.
66 const uint16_t ra_rnti =
67 1U + symbol_index + 14U * slot_index + 14U * 80U * frequency_index + (14U * 80U * 8U * (is_sul ? 1U : 0U));
68 return ra_rnti;
69}

◆ get_ra_rnti_pdsch_time_domain_list()

span< const pdsch_time_domain_resource_allocation > srsran::get_ra_rnti_pdsch_time_domain_list ( const pdsch_config_common & pdsch_common,
cyclic_prefix cp,
dmrs_typeA_position dmrs_typeA_pos )

Determines the time domain resource allocation table to be used for PDSCH scheduled with RA-RNTI as per TS 38.214, clause 5.1.2.1.1-1.

Parameters
[in]pdsch_commonPDSCH common configuration.
[in]cpCyclic prefix.
[in]dmrs_posDM-RS for mapping Type A position.
Returns
A list of valid PDSCH time-domain allocation configurations to choose from.
201{
202 // See TS 38.214, Table 5.1.2.1.1-1: Applicable PDSCH time domain resource allocation for RA-RNTI.
203 if (not pdsch_common.pdsch_td_alloc_list.empty()) {
204 return pdsch_common.pdsch_td_alloc_list;
205 }
206 return pdsch_default_time_allocations_default_A_table(cp, dmrs_typeA_pos);
207}
std::vector< pdsch_time_domain_resource_allocation > pdsch_td_alloc_list
PDSCH time domain resource allocations. Size: (0..maxNrofDL-Allocations=16).
Definition bwp_configuration.h:112

◆ get_rb_bw_khz()

constexpr std::size_t srsran::get_rb_bw_khz ( subcarrier_spacing scs)
inlineconstexpr

Compute RB bandwidth in kHz, based on the used numerology.

39{
41}
constexpr unsigned scs_to_khz(subcarrier_spacing scs)
Converts SCS into integer in kHz.
Definition subcarrier_spacing.h:56

◆ get_rbg_size()

unsigned srsran::get_rbg_size ( crb_interval bwp_rbs,
nominal_rbg_size P,
uint32_t rbg_idx )

Calculates size of indexed RBG in number of RBs.

Remarks
See TS 38.214, Sections 5.1.2.2.1 and 6.1.2.2.1.
55{
56 uint32_t nof_rbgs = get_nof_rbgs(bwp_rbs, P);
57 srsran_sanity_check(rbg_idx < nof_rbgs, "RBG index out-of-bounds ({} >= {})", rbg_idx, nof_rbgs);
58 if (rbg_idx == 0) {
59 return to_nominal_rbg_size_value(P) - (bwp_rbs.start() % to_nominal_rbg_size_value(P));
60 }
61 if (rbg_idx == nof_rbgs - 1) {
62 uint32_t ret = (bwp_rbs.stop()) % to_nominal_rbg_size_value(P);
63 return ret > 0 ? ret : to_nominal_rbg_size_value(P);
64 }
65 return to_nominal_rbg_size_value(P);
66}

◆ get_ri_li_cqi_cri_sizes()

ri_li_cqi_cri_sizes srsran::get_ri_li_cqi_cri_sizes ( pmi_codebook_type pmi_codebook,
ri_restriction_type ri_restriction,
csi_report_data::ri_type ri,
unsigned nof_csi_rs_resources )

Gets the RI, LI, wideband CQI, and CRI fields bit-width.

102{
104
105 switch (pmi_codebook) {
106 case pmi_codebook_type::one:
107 case pmi_codebook_type::two:
108 case pmi_codebook_type::typeI_single_panel_4ports_mode1:
109 return get_ri_li_cqi_cri_sizes_typeI_single_panel(
110 nof_csi_antenna_ports, ri_restriction, ri, nof_csi_rs_resources);
111 case pmi_codebook_type::other:
112 default:
113 return {};
114 }
115}

◆ get_sch_segmentation_info()

sch_information srsran::get_sch_segmentation_info ( units::bits tbs,
float target_code_rate )

Gets the Shared Channel (SCH) derived parameters from the transport block size and target code rate, expressed as $R$.

31{
32 srsran_assert(target_code_rate > 0.F && target_code_rate < 1.F,
33 "Invalid target code rate {}, expected a value between 0 and 1",
34 target_code_rate);
35
36 sch_information result;
37
38 // Calculate the transport block CRC size.
39 result.tb_crc_size = ldpc::compute_tb_crc_size(tbs);
40
41 // Select base graph.
42 result.base_graph = get_ldpc_base_graph(target_code_rate, tbs);
43
44 // Calculate the number of codeblocks.
45 result.nof_cb = ldpc::compute_nof_codeblocks(tbs, result.base_graph);
46
47 // Calculate the number of bits per codeblock.
48 units::bits nof_payload_bits_per_cb((tbs + result.tb_crc_size).value() / result.nof_cb);
49 if (result.nof_cb > 1) {
51 }
52
53 // Calculate lifting size.
54 result.lifting_size = ldpc::compute_lifting_size(tbs, result.base_graph, result.nof_cb);
55
56 // Calculate the codeblock size.
57 result.nof_bits_per_cb = ldpc::compute_codeblock_size(result.base_graph, result.lifting_size);
58
59 // Calculate the number of filler bits per codeblock.
60 result.nof_filler_bits_per_cb = result.nof_bits_per_cb - nof_payload_bits_per_cb;
61
62 return result;
63}
constexpr unsigned compute_nof_codeblocks(units::bits tbs, ldpc_base_graph_type bg)
Computes the number of codeblocks from a transport block size.
Definition ldpc.h:140
unsigned compute_lifting_size(units::bits tbs, ldpc_base_graph_type base_graph, unsigned nof_segments)
Computes the lifting size used to encode/decode a transport block.
Definition ldpc.h:157
constexpr units::bits compute_tb_crc_size(units::bits tbs)
Computes the transport block CRC size from the transport block size.
Definition ldpc.h:128
units::bits compute_codeblock_size(ldpc_base_graph_type base_graph, unsigned lifting_size)
Computes the codeblock size for the given base graph and lifting size.
Definition ldpc.h:200
constexpr ldpc_base_graph_type get_ldpc_base_graph(float R, units::bits A)
Returns the LDPC base graph based on the given code rate and transport block size in bits,...
Definition ldpc_base_graph.h:38
Collects Shared Channel (SCH) parameters derived from the transport block size and the target code ra...
Definition sch_segmentation.h:31
static constexpr units::bits CB_CRC_SIZE
Codeblock CRC size.
Definition sch_segmentation.h:33

◆ get_sch_to_dmrs_ratio_dB()

float srsran::get_sch_to_dmrs_ratio_dB ( unsigned nof_cdm_groups_without_data)
inline

Calculates the ratio between the Physical Shared Channel EPRE and the DM-RS EPRE.

The calculation is common for PDSCH and PUSCH, as defined in TS38.214 Table 4.1-1 and Table 6.2.2-1.

Parameters
[in]nof_cdm_groups_without_dataNumber of CDM groups without data.
Returns
Parameter $\beta_{\textup{DMRS}}$ in decibels.
37{
38 srsran_assert(nof_cdm_groups_without_data > 0 && nof_cdm_groups_without_data < 4,
39 "Invalid number of DMRS CDM groups without data.");
40 static constexpr std::array<float, 4> beta_dmrs_values = {NAN, 0, -3, -4.77};
41 return beta_dmrs_values[nof_cdm_groups_without_data];
42}

◆ get_scrambling_n_ID()

unsigned srsran::get_scrambling_n_ID ( pci_t pci,
const coreset_configuration & cs_cfg,
const search_space_configuration & ss_cfg )
inline

Calculates $n_ID$ as per TS38.211 7.3.2.3.

Returns
integer within values: {0,1,...,65535}.
38{
39 // For a UE-specific search space [...] equals the higher-layer parameter pdcch-DMRS-ScramblingID if configured,
40 if (not ss_cfg.is_common_search_space() and cs_cfg.pdcch_dmrs_scrambling_id.has_value()) {
41 return *cs_cfg.pdcch_dmrs_scrambling_id;
42 }
43 // \f$n_id = N_{ID}^{cell}\f$ otherwise.
44 return pci;
45}
Here is the call graph for this function:

◆ get_scrambling_n_RNTI()

unsigned srsran::get_scrambling_n_RNTI ( rnti_t rnti,
const coreset_configuration & cs_cfg,
const search_space_configuration & ss_cfg )
inline

Calculates $n_{RNTI}$ as per TS38.211, 7.3.2.3.

Returns
integer within values: {0,1,...,65535}.
51{
52 // \f$n_{RNTI}\f$ is given by the C-RNTI for a PDCCH in a UE-speicfic search space if the higher-layer parameter
53 // pdcch-DMRS-ScramblingID is configured.
54 if (not ss_cfg.is_common_search_space() and cs_cfg.pdcch_dmrs_scrambling_id.has_value()) {
55 return to_value(rnti);
56 }
57 return 0;
58}
Here is the call graph for this function:

◆ get_si_rnti_pdsch_time_domain_list()

span< const pdsch_time_domain_resource_allocation > srsran::get_si_rnti_pdsch_time_domain_list ( cyclic_prefix cp,
dmrs_typeA_position dmrs_typeA_pos )

Determines the time domain resource allocation table to be used for PDSCH scheduled with SI-RNTI Type0 common as per TS 38.214, clause 5.1.2.1.1-1.

Parameters
[in]cpCyclic prefix.
[in]dmrs_posDM-RS for mapping Type A position.
Returns
A list of valid PDSCH time-domain allocation configurations to choose from.
175{
176 // TODO: Check for multiplexing pattern and SearchSpace type (Type0 common).
177 // NOTE: Type0 common PDCCH and multiplexing pattern 1 is assumed to fetch applicable PDSCH time domain resource
178 // allocation.
179 return pdsch_default_time_allocations_default_A_table(cp, dmrs_typeA_pos);
180}

◆ get_si_rnti_type0A_common_pdsch_time_domain_list()

span< const pdsch_time_domain_resource_allocation > srsran::get_si_rnti_type0A_common_pdsch_time_domain_list ( const pdsch_config_common & pdsch_common,
cyclic_prefix cp,
dmrs_typeA_position dmrs_typeA_pos )

Determines the time domain resource allocation table to be used for PDSCH scheduled with SI-RNTI Type0A common as per TS 38.214, clause 5.1.2.1.1-1.

Parameters
[in]cpCyclic prefix.
[in]dmrs_posDM-RS for mapping Type A position.
Returns
A list of valid PDSCH time-domain allocation configurations to choose from.
186{
187 // See TS 38.214, Table 5.1.2.1.1-1: Applicable PDSCH time domain resource allocation for SI-RNTI Type0A common.
188 if (not pdsch_common.pdsch_td_alloc_list.empty()) {
189 return pdsch_common.pdsch_td_alloc_list;
190 }
191 // TODO: Check for multiplexing pattern and SearchSpace type (Type0A common).
192 // NOTE: Type0A common PDCCH and multiplexing pattern 1 is assumed to fetch applicable PDSCH time domain resource
193 // allocation.
194 return pdsch_default_time_allocations_default_A_table(cp, dmrs_typeA_pos);
195}

◆ get_sib_info_type()

sib_type srsran::get_sib_info_type ( const sib_info & sib)
inline
191{
192 if (variant_holds_alternative<sib2_info>(sib)) {
193 return sib_type::sib2;
194 }
195 if (variant_holds_alternative<sib19_info>(sib)) {
196 return sib_type::sib19;
197 }
198 return sib_type::sib_invalid;
199}

◆ get_ssb_crbs()

crb_interval srsran::get_ssb_crbs ( subcarrier_spacing ssb_scs,
subcarrier_spacing scs_common,
ssb_offset_to_pointA offset_to_pA,
ssb_subcarrier_offset k_ssb )

Calculate the CRBs (with reference to SCS common grid) where the SSB is allocated.

Parameters
[in]ssb_scsis the SSB Sub-Carrier Spacing, as per TS 38.213, Section 4.1.
[in]scs_commonis the Sub-Carrier Spacing of the Initial DL BWP.
[in]offset_to_pAis the OffsetToPointA, , as per TS 38.211, Section 4.4.4.2.
[in]k_ssbis the SSB subcarrier offset, or k_ssb, as per TS 38.211, Section 7.4.3.1.
Returns
The CRB interval (with reference to SCS common grid) where the SSB is allocated.
71{
72 report_fatal_error_if_not(ssb_scs == scs_common, "Mixed numerology not supported");
73 report_fatal_error_if_not(scs_common <= subcarrier_spacing::kHz30, "Only FR1 frequency supported");
74
75 // With SCScommon kHz30, offset_to_pointA must be a multiple of 2. This is because it is measured in 15kHz RB, while
76 // it points at a CRB which is based on 30kHz.
77 if (scs_common == subcarrier_spacing::kHz30) {
78 srsran_sanity_check(offset_to_pA.to_uint() % 2 == 0,
79 "With SCScommon with 30kHz OffsetToPointA must be an even number");
80 }
81 unsigned ssb_crbs_start =
82 scs_common == subcarrier_spacing::kHz15 ? offset_to_pA.to_uint() : offset_to_pA.to_uint() / 2;
83 // TODO: Extent this function to cover mixed numerologies. Depending on the reference grid, NOF_SSB_PRBS might be
84 // multiplied or divided by 2.
85
86 // As per TS 38.211, Section 7.4.3.1, the SSB occupies 240 subcarriers, or 20 PRBs. In the case of FR1, and SSB SCS ==
87 // SCScommon, if k_SSB > 1, the SSB PRBs will be shifted with respect to the Common RBs grid; this means that the SSB
88 // will overlap over 1 additional CRB (at the end of the SS/PBCH Block).
89 unsigned ssb_crbs_stop = k_ssb.to_uint() > 0 ? ssb_crbs_start + NOF_SSB_PRBS + 1 : ssb_crbs_start + NOF_SSB_PRBS;
90
92}

◆ get_tpmi_select_info()

pusch_tpmi_select_info srsran::get_tpmi_select_info ( const srs_channel_matrix & channel,
float noise_variance )

Selects the Transmit Precoding Matrix Indicator (TPMI) for each possible number of layers supported by the channel topology.

Parameters
[in]channelChannel coefficient matrix.
[in]noise_varianceLinear noise variance.
Returns
The TPMI information given the channel coefficients and noise variance.
74{
75 unsigned nof_tx_ports = channel.get_nof_tx_ports();
76 unsigned nof_rx_ports = channel.get_nof_rx_ports();
77
78 // Two transmit, one receive ports.
79 if ((nof_tx_ports == 2) && (nof_rx_ports == 1)) {
80 return get_tpmi_select_info_1x2(channel, noise_variance);
81 }
82
83 // Return invalid information.
84 return {};
85}

◆ get_transaction_id() [1/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e1ap::e1ap_pdu_c & pdu)
inline

Extracts transaction id of E1AP PDU.

131{
132 using namespace asn1::e1ap;
133 switch (pdu.type().value) {
134 case e1ap_pdu_c::types_opts::init_msg:
135 return get_transaction_id(pdu.init_msg());
136 case e1ap_pdu_c::types_opts::successful_outcome:
137 return get_transaction_id(pdu.successful_outcome());
138 case e1ap_pdu_c::types_opts::unsuccessful_outcome:
139 return get_transaction_id(pdu.unsuccessful_outcome());
140 default:
141 break;
142 }
143 return {default_error_t{}};
144}
expected< uint8_t > get_transaction_id(const asn1::e1ap::init_msg_s &out)
Extracts transaction id of Initiating message.
Definition e1ap_asn1_utils.h:70

◆ get_transaction_id() [2/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e1ap::init_msg_s & out)
inline

Extracts transaction id of Initiating message.

71{
72 using namespace asn1::e1ap;
73 switch (out.value.type().value) {
74 case e1ap_elem_procs_o::init_msg_c::types_opts::gnb_cu_cp_e1_setup_request:
75 return out.value.gnb_cu_cp_e1_setup_request()->transaction_id;
76 case e1ap_elem_procs_o::init_msg_c::types_opts::gnb_cu_up_e1_setup_request:
77 return out.value.gnb_cu_up_e1_setup_request()->transaction_id;
78 case e1ap_elem_procs_o::init_msg_c::types_opts::gnb_cu_cp_cfg_upd:
79 return out.value.gnb_cu_cp_cfg_upd()->transaction_id;
80 case e1ap_elem_procs_o::init_msg_c::types_opts::gnb_cu_up_cfg_upd:
81 return out.value.gnb_cu_up_cfg_upd()->transaction_id;
82 // TODO: Remaining cases.
83 default:
84 break;
85 }
86 return {default_error_t{}};
87}

◆ get_transaction_id() [3/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e1ap::successful_outcome_s & out)
inline

Extracts transaction id of Successful Outcome message.

91{
92 using namespace asn1::e1ap;
93 switch (out.value.type().value) {
94 case e1ap_elem_procs_o::successful_outcome_c::types_opts::gnb_cu_cp_e1_setup_resp:
95 return out.value.gnb_cu_cp_e1_setup_resp()->transaction_id;
96 case e1ap_elem_procs_o::successful_outcome_c::types_opts::gnb_cu_up_e1_setup_resp:
97 return out.value.gnb_cu_up_e1_setup_resp()->transaction_id;
98 case e1ap_elem_procs_o::successful_outcome_c::types_opts::gnb_cu_cp_cfg_upd_ack:
99 return out.value.gnb_cu_cp_cfg_upd_ack()->transaction_id;
100 case e1ap_elem_procs_o::successful_outcome_c::types_opts::gnb_cu_up_cfg_upd_ack:
101 return out.value.gnb_cu_up_cfg_upd_ack()->transaction_id;
102 // TODO: Remaining cases.
103 default:
104 break;
105 }
106 return {default_error_t{}};
107}

◆ get_transaction_id() [4/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e1ap::unsuccessful_outcome_s & out)
inline

Extracts transaction id of Unsuccessful Outcome message.

111{
112 using namespace asn1::e1ap;
113 switch (out.value.type().value) {
114 case e1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::gnb_cu_cp_e1_setup_fail:
115 return out.value.gnb_cu_cp_e1_setup_fail()->transaction_id;
116 case e1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::gnb_cu_up_e1_setup_fail:
117 return out.value.gnb_cu_up_e1_setup_fail()->transaction_id;
118 case e1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::gnb_cu_cp_cfg_upd_fail:
119 return out.value.gnb_cu_cp_cfg_upd_fail()->transaction_id;
120 case e1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::gnb_cu_up_cfg_upd_fail:
121 return out.value.gnb_cu_up_cfg_upd_fail()->transaction_id;
122 // TODO: Remaining cases.
123 default:
124 break;
125 }
126 return {default_error_t{}};
127}

◆ get_transaction_id() [5/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e2ap::e2_ap_pdu_c & pdu)
inline

Extracts transaction id of E2AP PDU.

73{
74 using namespace asn1::e2ap;
75 switch (pdu.type().value) {
76 case e2_ap_pdu_c::types_opts::init_msg:
77 return get_transaction_id(pdu.init_msg());
78 case e2_ap_pdu_c::types_opts::successful_outcome:
79 return get_transaction_id(pdu.successful_outcome());
80 case e2_ap_pdu_c::types_opts::unsuccessful_outcome:
81 return get_transaction_id(pdu.unsuccessful_outcome());
82 default:
83 break;
84 }
85 return {default_error_t{}};
86}

◆ get_transaction_id() [6/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e2ap::init_msg_s & out)
inline

Extracts transaction id of Initiating message.

33{
34 using namespace asn1::e2ap;
35 switch (out.value.type().value) {
36 case e2_ap_elem_procs_o::init_msg_c::types_opts::e2setup_request:
37 return out.value.e2setup_request()->transaction_id.value.value;
38 default:
39 break;
40 }
41 return {default_error_t{}};
42}

◆ get_transaction_id() [7/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e2ap::successful_outcome_s & out)
inline

Extracts transaction id of Successful Outcome message.

46{
47 using namespace asn1::e2ap;
48 switch (out.value.type().value) {
49 case e2_ap_elem_procs_o::successful_outcome_c::types_opts::e2setup_resp:
50 return out.value.e2setup_resp()->transaction_id.value.value;
51 break;
52 default:
53 break;
54 }
55 return {default_error_t{}};
56}

◆ get_transaction_id() [8/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::e2ap::unsuccessful_outcome_s & out)
inline

Extracts transaction id of Unsuccessful Outcome message.

60{
61 using namespace asn1::e2ap;
62 switch (out.value.type().value) {
63 case e2_ap_elem_procs_o::unsuccessful_outcome_c::types_opts::e2setup_fail:
64 return out.value.e2setup_fail()->transaction_id.value.value;
65 default:
66 break;
67 }
68 return {default_error_t{}};
69}

◆ get_transaction_id() [9/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::f1ap::f1ap_pdu_c & pdu)
inline

Extracts transaction id of F1AP PDU.

133{
134 using namespace asn1::f1ap;
135 switch (pdu.type().value) {
136 case f1ap_pdu_c::types_opts::init_msg:
137 return get_transaction_id(pdu.init_msg());
138 case f1ap_pdu_c::types_opts::successful_outcome:
139 return get_transaction_id(pdu.successful_outcome());
140 case f1ap_pdu_c::types_opts::unsuccessful_outcome:
141 return get_transaction_id(pdu.unsuccessful_outcome());
142 default:
143 break;
144 }
145 return {default_error_t{}};
146}

◆ get_transaction_id() [10/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::f1ap::init_msg_s & out)
inline

Extracts transaction id of Initiating message.

71{
72 using namespace asn1::f1ap;
73 switch (out.value.type().value) {
74 case f1ap_elem_procs_o::init_msg_c::types_opts::f1_setup_request:
75 return out.value.f1_setup_request()->transaction_id;
76 case f1ap_elem_procs_o::init_msg_c::types_opts::gnb_cu_cfg_upd:
77 return out.value.gnb_cu_cfg_upd()->transaction_id;
78 case f1ap_elem_procs_o::init_msg_c::types_opts::gnb_du_cfg_upd:
79 return out.value.gnb_du_cfg_upd()->transaction_id;
80 case f1ap_elem_procs_o::init_msg_c::types_opts::f1_removal_request:
81 return (*out.value.f1_removal_request())[0]->transaction_id();
82 case f1ap_elem_procs_o::init_msg_c::types_opts::init_ul_rrc_msg_transfer:
83 return (*out.value.init_ul_rrc_msg_transfer()).transaction_id;
84 // TODO: Remaining cases.
85 default:
86 break;
87 }
88 return {default_error_t{}};
89}

◆ get_transaction_id() [11/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::f1ap::successful_outcome_s & out)
inline

Extracts transaction id of Successful Outcome message.

93{
94 using namespace asn1::f1ap;
95 switch (out.value.type().value) {
96 case f1ap_elem_procs_o::successful_outcome_c::types_opts::f1_setup_resp:
97 return out.value.f1_setup_resp()->transaction_id;
98 case f1ap_elem_procs_o::successful_outcome_c::types_opts::gnb_cu_cfg_upd_ack:
99 return out.value.gnb_cu_cfg_upd_ack()->transaction_id;
100 case f1ap_elem_procs_o::successful_outcome_c::types_opts::gnb_du_cfg_upd_ack:
101 return out.value.gnb_du_cfg_upd_ack()->transaction_id;
102 case f1ap_elem_procs_o::successful_outcome_c::types_opts::f1_removal_resp:
103 return out.value.f1_removal_resp()->transaction_id;
104 // TODO: Remaining cases.
105 default:
106 break;
107 }
108 return {default_error_t{}};
109}

◆ get_transaction_id() [12/12]

expected< uint8_t > srsran::get_transaction_id ( const asn1::f1ap::unsuccessful_outcome_s & out)
inline

Extracts transaction id of Unsuccessful Outcome message.

113{
114 using namespace asn1::f1ap;
115 switch (out.value.type().value) {
116 case f1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::f1_setup_fail:
117 return out.value.f1_setup_fail()->transaction_id;
118 case f1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::gnb_cu_cfg_upd_fail:
119 return out.value.gnb_cu_cfg_upd_fail()->transaction_id;
120 case f1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::gnb_du_cfg_upd_fail:
121 return out.value.gnb_du_cfg_upd_fail()->transaction_id;
122 case f1ap_elem_procs_o::unsuccessful_outcome_c::types_opts::f1_removal_fail:
123 return out.value.f1_removal_fail()->transaction_id;
124 // TODO: Remaining cases.
125 default:
126 break;
127 }
128 return {default_error_t{}};
129}

◆ get_type0_pdcch_css_n0()

slot_point srsran::get_type0_pdcch_css_n0 ( double table_13_11_and_13_12_O,
double table_13_11_and_13_12_M,
subcarrier_spacing scs_common,
unsigned ssb_index )

Helper function that returns slot n0 (where UE should monitor Type0-PDCCH CSS) for a given SSB (beam) index.

Parameters
[in]table_13_11_and_13_12_OParameter O provided in Table 13-11 and 13-12 of TS 38 213.
[in]table_13_11_and_13_12_MParameter M provided in Table 13-11 and 13-12 of TS 38 213.
[in]scs_commonSCS for PDCCH receptions in the CORESET.
[in]ssb_indexSS/PBCH block with index.
Returns
Returns slot n0 where UE should monitor Type0-PDCCH CSS.
111{
112 // Initialize n0 to a slot_point = 0.
113 const uint8_t numerology_mu = to_numerology_value(scs_common);
115
116 // Compute n0 = ( O * 2^mu + floor(i*M) ) % nof_slots_per_frame, as per TS 38.213, Section 13.
117 type0_pdcch_css_n0 += static_cast<unsigned>(static_cast<double>(table_13_11_and_13_12_O * (1U << numerology_mu)) +
118 floor(static_cast<double>(ssb_index) * table_13_11_and_13_12_M)) %
120
121 // We want to express n0 as a value from 0 to max_nof_slots. Since the mod operation above cap n0 to
122 // (nof_slots_per_frame - 1), we need to add nof_slots_per_frame to n0 if this falls into an odd frame.
125 type0_pdcch_css_n0.nof_slots_per_frame();
126
127 return type0_pdcch_css_n0;
128}
Definition slot_point.h:51
constexpr uint32_t nof_slots_per_frame() const
Number of slots present in a frame. Depends on numerology.
Definition slot_point.h:127
unsigned type0_pdcch_css_n0_is_even_frame(double table_13_11_and_13_12_O, double table_13_11_and_13_12_M, uint8_t numerology_mu, unsigned ssb_index)
Helper function that returns whether slot n0 of Type0-PDCCH CSS is in an even/odd frame.
Definition pdcch_type0_css_occasions.cpp:91

◆ get_uci_crc_size()

constexpr unsigned srsran::get_uci_crc_size ( unsigned payload_size)
constexpr

Gets the number of CRC bits per UCI codeblock.

The number of CRC bits is described in TS38.212 Section 6.3.1.2.1.

Parameters
[in]payload_sizeNumber of payload bits in the UCI message. Parameter $A$.
Returns
The CRC number of bits per codeblock. Parameter $L$.
50{
51 if (payload_size < 12) {
52 return 0;
53 }
54
55 if (payload_size < 20) {
56 return 6;
57 }
58
59 return 11;
60}

◆ get_uci_nof_crc_bits()

constexpr unsigned srsran::get_uci_nof_crc_bits ( unsigned message_length,
unsigned codeword_length )
constexpr

Gets the total number of CRC bits appended in a UCI message, considering segmentation.

64{
65 // Number of codeblocks.
66 unsigned nof_codeblocks = get_nof_uci_codeblocks(message_length, codeword_length);
67
68 // Get number of CRC bits per codeblock.
69 unsigned nof_crc_bits = get_uci_crc_size(message_length);
70
71 return nof_codeblocks * nof_crc_bits;
72}
constexpr unsigned get_nof_uci_codeblocks(unsigned message_length, unsigned codeword_length)
Gets the number of codeblocks for a transmission containing a UCI message.
Definition uci_info.h:35
constexpr unsigned get_uci_crc_size(unsigned payload_size)
Gets the number of CRC bits per UCI codeblock.
Definition uci_info.h:49

◆ get_ulsch_information()

ulsch_information srsran::get_ulsch_information ( const ulsch_configuration & config)

Gets the UL-SCH information for a given PUSCH configuration.

164{
165 using namespace units::literals;
166
167 ulsch_information result = {};
168
169 // Get shared channel parameters.
170 if (config.tbs > 0_bits) {
171 result.sch.emplace(get_sch_segmentation_info(config.tbs, config.mcs_descr.get_normalised_target_code_rate()));
172 }
173
174 // Check whether the number of CDM groups without data is valid.
175 srsran_assert(config.nof_cdm_groups_without_data >= 1 &&
176 config.nof_cdm_groups_without_data <= get_max_nof_cdm_groups_without_data(config.dmrs_type),
177 "The number of CDM groups without data (i.e., {}) is invalid (min. 1, max. {}).",
179 get_max_nof_cdm_groups_without_data(config.dmrs_type));
180
181 // Make sure the OFDM symbol that carry DM-RS are within the time allocation.
182 srsran_assert(config.dmrs_symbol_mask.count() > 0,
183 "The number of OFDM symbols carrying DM-RS RE must be greater than zero.");
184 srsran_assert(
185 static_cast<unsigned>(config.dmrs_symbol_mask.find_lowest(true)) >= config.start_symbol_index,
186 "The index of the first OFDM symbol carrying DM-RS (i.e., {}) must be equal to or greater than the first symbol "
187 "allocated to transmission (i.e., {}).",
188 config.dmrs_symbol_mask.find_lowest(true),
189 config.start_symbol_index);
190 srsran_assert(static_cast<unsigned>(config.dmrs_symbol_mask.find_highest(true)) <
191 (config.start_symbol_index + config.nof_symbols),
192 "The index of the last OFDM symbol carrying DM-RS (i.e., {}) must be less than or equal to the last "
193 "symbol allocated "
194 "to transmission (i.e., {}).",
195 config.dmrs_symbol_mask.find_highest(true),
196 config.start_symbol_index + config.nof_symbols - 1);
197 srsran_assert(config.dmrs_symbol_mask.size() >= (config.start_symbol_index + config.nof_symbols),
198 "The DM-RS symbol mask size (i.e., {}) must be the same as the number of symbols allocated to the "
199 "transmission within the slot (i.e., {}).",
200 config.dmrs_symbol_mask.size(),
201 config.start_symbol_index + config.nof_symbols);
202
203 // Count number of OFDM symbols that contain DM-RS.
204 unsigned nof_symbols_dmrs = config.dmrs_symbol_mask.count();
205
206 // Count number of RE used for DM-RS.
207 unsigned nof_re_dmrs_per_rb =
208 nof_symbols_dmrs * config.nof_cdm_groups_without_data * get_nof_re_per_prb(config.dmrs_type);
209
210 // Count total number of resource elements available for UL data.
211 unsigned nof_re_total = config.nof_rb * (config.nof_symbols * NRE - nof_re_dmrs_per_rb);
212
213 // Count number of resource elements that can potentially carry UCI. It excludes symbols with DM-RS.
214 unsigned nof_re_uci = (config.nof_symbols - nof_symbols_dmrs) * config.nof_rb * NRE;
215
216 // Retrieve the modulation order.
217 unsigned modulation_order = get_bits_per_symbol(config.mcs_descr.modulation);
218
219 // Count the number of resource elements that can potentially carry UCI after the first burst of OFDM symbols that
220 // contain DM-RS.
221 unsigned nof_re_uci_l0 = 0;
222 for (unsigned i_symbol = config.dmrs_symbol_mask.find_lowest(),
225 ++i_symbol) {
226 // Skip if the OFDM symbol contains DM-RS.
227 if (config.dmrs_symbol_mask.test(i_symbol)) {
228 continue;
229 }
230
231 // Accumulate RE contained in the symbol.
232 nof_re_uci_l0 += config.nof_rb * NRE;
233 }
234
235 // Calculate the number of RE occupied by HARQ-ACK.
236 if (config.tbs > 0_bits) {
237 // In case of PUSCH multiplexing SCH.
238 result.nof_harq_ack_re =
239 calculate_nof_re_harq_ack(config.nof_harq_ack_bits,
242 result.sch.value().nof_cb * result.sch.value().nof_bits_per_cb.value(),
243 config.alpha_scaling,
245 } else {
246 // In case of PUSCH NOT multiplexing SCH.
247 result.nof_harq_ack_re = calculate_nof_re_harq_ack_without_sch(config.nof_harq_ack_bits,
250 modulation_order,
251 config.alpha_scaling,
253 }
254
255 // If two or less HARQ-ACK bits are multiplexed, then calculate the number of reserved bits as it was two HARQ-ACK
256 // payload bits.
257 unsigned nof_harq_ack_rvd_re = 0;
258 if (config.nof_harq_ack_bits < 2_bits) {
259 if (config.tbs > 0_bits) {
260 // In case of PUSCH multiplexing SCH.
262 calculate_nof_re_harq_ack(2_bits,
265 result.sch.value().nof_cb * result.sch.value().nof_bits_per_cb.value(),
266 config.alpha_scaling,
268 } else {
269 // In case of PUSCH NOT multiplexing SCH.
270 nof_harq_ack_rvd_re = calculate_nof_re_harq_ack_without_sch(2_bits,
273 modulation_order,
274 config.alpha_scaling,
276 }
277 } else if (config.nof_harq_ack_bits == 2_bits) {
278 nof_harq_ack_rvd_re = result.nof_harq_ack_re;
279 }
280
281 // If two or less HARQ-ACK bits are multiplexed, compute the CSI Part 1 RE using the reserved HARQ-ACK resources.
283 (config.nof_harq_ack_bits <= 2_bits) ? nof_harq_ack_rvd_re : result.nof_harq_ack_re;
284
285 // Calculate the number of RE occupied by CSI Part 1.
286 if (config.tbs > 0_bits) {
287 // In case of PUSCH multiplexing SCH.
288 result.nof_csi_part1_re =
289 calculate_nof_re_csi_part1(config.nof_csi_part1_bits,
293 result.sch.value().nof_cb * result.sch.value().nof_bits_per_cb.value(),
294 config.alpha_scaling);
295 } else {
296 // In case of PUSCH NOT multiplexing SCH.
297 result.nof_csi_part1_re = calculate_nof_re_csi_part1_without_sch(config.nof_csi_part1_bits,
298 config.nof_csi_part2_bits,
303 modulation_order);
304 }
305
306 // If two or less HARQ-ACK bits are multiplexed, compute the CSI Part 2 RE as if there were no HARQ-ACK resources.
307 unsigned nof_harq_ack_re_csi_part2 = (config.nof_harq_ack_bits <= 2_bits) ? 0 : result.nof_harq_ack_re;
308
309 // Calculate the number of RE occupied by CSI Part 2.
310 if (config.tbs > 0_bits) {
311 // In case of PUSCH multiplexing SCH.
312 result.nof_csi_part2_re =
313 calculate_nof_re_csi_part2(config.nof_csi_part2_bits,
317 result.nof_csi_part1_re,
318 result.sch.value().nof_cb * result.sch.value().nof_bits_per_cb.value(),
319 config.alpha_scaling);
320 } else {
321 // In case of PUSCH NOT multiplexing SCH.
322 result.nof_csi_part2_re = calculate_nof_re_csi_part2_without_sch(
323 config.nof_csi_part2_bits, nof_re_uci, nof_harq_ack_re_csi_part2, result.nof_csi_part1_re);
324 }
325
326 // Calculate actual number of RE used by HARQ-ACK. The RE used for HARQ-ACK bits are only considered when there are
327 // more than 2 HARQ-ACK bits.
328 unsigned nof_harq_ack_re = 0;
329 if (config.nof_harq_ack_bits > 2_bits) {
330 nof_harq_ack_re = result.nof_harq_ack_re;
331 }
332
333 // Calculate the number of RE occupied by shared channel payload.
334 unsigned nof_re_ul_sch =
335 (config.tbs > 0_bits) ? nof_re_total - nof_harq_ack_re - result.nof_csi_part1_re - result.nof_csi_part2_re : 0U;
336
337 // Number of bits used for shared channel.
338 result.nof_ul_sch_bits = units::bits(nof_re_ul_sch * config.nof_layers * modulation_order);
339
340 // Number of bits used for HARQ-ACK.
341 result.nof_harq_ack_bits = units::bits(result.nof_harq_ack_re * config.nof_layers * modulation_order);
342
343 // Number of bits reserved for HARQ-ACK.
344 result.nof_harq_ack_rvd = units::bits(nof_harq_ack_rvd_re * config.nof_layers * modulation_order);
345
346 // Number of bits used for CSI Part 1.
347 result.nof_csi_part1_bits = units::bits(result.nof_csi_part1_re * config.nof_layers * modulation_order);
348
349 // Number of bits used for CSI Part 2.
350 result.nof_csi_part2_bits = units::bits(result.nof_csi_part2_re * config.nof_layers * modulation_order);
351
352 return result;
353}
units::bits nof_csi_part2_bits
Number of CSI Part 2 bits to multiplex in the transmission. Parameter .
Definition ulsch_info.h:49
unsigned nof_rb
Transmission bandwidth in resource blocks.
Definition ulsch_info.h:61
unsigned nof_cdm_groups_without_data
Number of CDM groups without data.
Definition ulsch_info.h:71
float alpha_scaling
Parameter as per TS38.212 Section 6.3.2.4.
Definition ulsch_info.h:53
bounded_bitset< MAX_NSYMB_PER_SLOT > dmrs_symbol_mask
Boolean mask indicating which OFDM symbols in the slot contain DM-RS.
Definition ulsch_info.h:69
float beta_offset_csi_part1
Parameter .
Definition ulsch_info.h:57
float beta_offset_csi_part2
Parameter .
Definition ulsch_info.h:59
unsigned nof_layers
Number of transmission layers.
Definition ulsch_info.h:73
units::bits nof_harq_ack_bits
Number of HARQ-ACK bits to multiplex in the transmission. Parameter .
Definition ulsch_info.h:45
units::bits tbs
Transport block size. Set to zero if no shared channel is multiplexed.
Definition ulsch_info.h:41
unsigned nof_symbols
Number of OFDM symbols used for the transmission.
Definition ulsch_info.h:65
unsigned start_symbol_index
First OFDM index for the transmission within the slot.
Definition ulsch_info.h:63
units::bits nof_csi_part1_bits
Number of CSI Part 1 bits to multiplex in the transmission. Parameter .
Definition ulsch_info.h:47
dmrs_config_type dmrs_type
DM-RS Type.
Definition ulsch_info.h:67
sch_mcs_description mcs_descr
Modulation and coding scheme.
Definition ulsch_info.h:43
float beta_offset_harq_ack
Parameter .
Definition ulsch_info.h:55
Collects Uplink Shared Channel (UL-SCH) derived parameters.
Definition ulsch_info.h:79

◆ get_version()

const char * srsran::get_version ( )

Returns the full version with major.minor.patch as string.

29{
31}

◆ gnb_cu_cp_ue_e1ap_id_to_uint()

constexpr uint64_t srsran::gnb_cu_cp_ue_e1ap_id_to_uint ( gnb_cu_cp_ue_e1ap_id_t id)
inlineconstexpr
46{
47 return static_cast<uint64_t>(id);
48}

◆ gnb_cu_ue_f1ap_id_to_uint()

constexpr uint64_t srsran::gnb_cu_ue_f1ap_id_to_uint ( gnb_cu_ue_f1ap_id_t id)
inlineconstexpr
37{
38 return static_cast<uint64_t>(id);
39}

◆ gnb_cu_up_ue_e1ap_id_to_uint()

constexpr uint64_t srsran::gnb_cu_up_ue_e1ap_id_to_uint ( gnb_cu_up_ue_e1ap_id_t id)
inlineconstexpr
62{
63 return static_cast<uint64_t>(id);
64}

◆ gnb_du_ue_f1ap_id_to_uint()

constexpr uint64_t srsran::gnb_du_ue_f1ap_id_to_uint ( gnb_du_ue_f1ap_id_t id)
inlineconstexpr
53{
54 return static_cast<uint64_t>(id);
55}

◆ gtpu_dissect_pdu()

bool srsran::gtpu_dissect_pdu ( gtpu_dissected_pdu & dissected_pdu,
byte_buffer raw_pdu,
gtpu_tunnel_logger & logger )

Creates a dissected representation of a raw GTP-U PDU with access to the unpacked header and to the raw content of the extension headers for further processing of the extensions.

Parameters
[out]dissected_pduReference to an object into which the dissected GTP-U PDU shall be filled/moved.
[in]raw_pduThe raw GTP-U PDU that shall be dissected.
[in]loggerAccess to the logger.
Returns
True if the dissection was successful, False otherwise.
149{
150 if (raw_pdu.length() < GTPU_BASE_HEADER_LEN) {
151 logger.log_error(raw_pdu.begin(), raw_pdu.end(), "GTP-U PDU is too small. pdu_len={}", raw_pdu.length());
152 return false;
153 }
154
155 dissected_pdu.buf = std::move(raw_pdu);
156 bit_decoder decoder{dissected_pdu.buf};
157
158 // Flags
159 decoder.unpack(dissected_pdu.hdr.flags.version, 3);
160 decoder.unpack(dissected_pdu.hdr.flags.protocol_type, 1);
161 uint8_t spare = {};
162 decoder.unpack(spare, 1); // Reserved
163 decoder.unpack(dissected_pdu.hdr.flags.ext_hdr, 1); // E
164 decoder.unpack(dissected_pdu.hdr.flags.seq_number, 1); // S
165 decoder.unpack(dissected_pdu.hdr.flags.n_pdu, 1); // PN
166
167 // Check supported flags
168 if (!gtpu_supported_flags_check(dissected_pdu.hdr, logger)) {
169 logger.log_error("Unhandled GTP-U Flags. {}", dissected_pdu.hdr.flags);
170 return false;
171 }
172
173 // Message type
174 decoder.unpack(dissected_pdu.hdr.message_type, 8);
175
176 // Length
177 decoder.unpack(dissected_pdu.hdr.length, 16);
178
179 // TEID
180 decoder.unpack(dissected_pdu.hdr.teid.value(), 32);
181
182 // Validate length before dissecting any optional fields
183 uint16_t expected_length = dissected_pdu.buf.length() - GTPU_BASE_HEADER_LEN;
184 if (dissected_pdu.hdr.length != expected_length) {
185 logger.log_error("PDU length does not match the length in GTP-U header. hdr_len={}, expected_len={}",
186 dissected_pdu.hdr.length,
187 expected_length);
188 return false;
189 }
190
191 // Optional header fields
192 if (dissected_pdu.hdr.flags.ext_hdr || dissected_pdu.hdr.flags.seq_number || dissected_pdu.hdr.flags.n_pdu) {
193 // Sanity check PDU length
194 if (dissected_pdu.buf.length() < GTPU_EXTENDED_HEADER_LEN) {
195 logger.log_error(dissected_pdu.buf.begin(),
196 dissected_pdu.buf.end(),
197 "Extended GTP-U PDU is too small. pdu_len={}",
198 dissected_pdu.buf.length());
199 return false;
200 }
201
202 // Sequence Number
203 decoder.unpack(dissected_pdu.hdr.seq_number, 16);
204
205 // N-PDU
206 decoder.unpack(dissected_pdu.hdr.n_pdu, 8);
207
208 // Next Extension Header Type
209 gtpu_unpack_ext_header_type(decoder, dissected_pdu.hdr.next_ext_hdr_type);
210
211 if (not gtpu_extension_header_comprehension_check(dissected_pdu.hdr.next_ext_hdr_type, logger)) {
212 return false;
213 }
214 }
215
216 // Read Header Extensions
217 if (dissected_pdu.hdr.flags.ext_hdr) {
218 if (dissected_pdu.hdr.next_ext_hdr_type == gtpu_extension_header_type::no_more_extension_headers) {
219 logger.log_error(dissected_pdu.buf.begin(),
220 dissected_pdu.buf.end(),
221 "E flag is set, but there are no further extensions. pdu_len={}",
222 dissected_pdu.buf.length());
223 return false;
224 }
225 gtpu_extension_header_type next_extension_header_type = dissected_pdu.hdr.next_ext_hdr_type;
226 do {
227 gtpu_extension_header ext = {};
228 ext.extension_header_type = next_extension_header_type;
229 if (not gtpu_extension_header_comprehension_check(ext.extension_header_type, logger)) {
230 return false;
231 }
232 if (!gtpu_read_ext_header(decoder, ext, next_extension_header_type, logger)) {
233 return false;
234 }
235 if (dissected_pdu.hdr.ext_list.size() < dissected_pdu.hdr.ext_list.capacity()) {
236 dissected_pdu.hdr.ext_list.push_back(ext);
237 } else {
238 logger.log_error("PDU exceeds the supported number of header extensions. capacity={}",
239 dissected_pdu.hdr.ext_list.capacity());
240 return false;
241 }
242
243 } while (next_extension_header_type != gtpu_extension_header_type::no_more_extension_headers);
244 }
245
246 // Save header length
247 dissected_pdu.hdr_len = decoder.nof_bytes();
248
249 return true;
250}
size_t length() const
Checks byte_buffer length.
Definition byte_buffer.h:330
bool gtpu_supported_flags_check(const gtpu_header &header, gtpu_tunnel_logger &logger)
Supported feature helpers.
Definition gtpu_pdu.cpp:311
byte_buffer buf
Storage of the original GTP-U PDU to which the views of the extension header content is mapped.
Definition gtpu_pdu.h:221
size_t hdr_len
Total header length (including all extension headers); marks the start of the T-PDU.
Definition gtpu_pdu.h:225
gtpu_header hdr
Access to the dissected content of the GTP-U PDU.
Definition gtpu_pdu.h:223
static_vector< gtpu_extension_header, GTPU_MAX_NUM_HEADER_EXTENSIONS > ext_list
Collection of included GTP-U header extensions.
Definition gtpu_pdu.h:212
uint16_t length
Definition gtpu_pdu.h:201
uint8_t n_pdu
N-PDU Number.
Definition gtpu_pdu.h:207
gtpu_extension_header_type next_ext_hdr_type
Definition gtpu_pdu.h:210
uint8_t message_type
This field indicates the type of GTP-U message.
Definition gtpu_pdu.h:197
gtpu_teid_t teid
Tunnel Endpoint Identifier.
Definition gtpu_pdu.h:203
uint16_t seq_number
Sequence Number.
Definition gtpu_pdu.h:205

◆ gtpu_extension_header_comprehension_check()

bool srsran::gtpu_extension_header_comprehension_check ( const gtpu_extension_header_type & type,
gtpu_tunnel_logger & logger )
342{
343 switch (type) {
344 case gtpu_extension_header_type::no_more_extension_headers:
345 return true;
346 case gtpu_extension_header_type::service_class_indicator:
347 case gtpu_extension_header_type::udp_port:
348 case gtpu_extension_header_type::ran_container:
349 case gtpu_extension_header_type::long_pdcp_pdu_number_0:
350 case gtpu_extension_header_type::long_pdcp_pdu_number_1:
351 case gtpu_extension_header_type::xw_ran_container:
352 case gtpu_extension_header_type::nr_ran_container:
353 break;
354 case gtpu_extension_header_type::pdu_session_container:
355 return true; // TODO add actual support for PDU session container
356 case gtpu_extension_header_type::pdcp_pdu_number:
357 return true; // TODO add actual support for PDCP PDU number
358 case gtpu_extension_header_type::reserved_0:
359 case gtpu_extension_header_type::reserved_1:
360 case gtpu_extension_header_type::reserved_2:
361 case gtpu_extension_header_type::reserved_3:
362 return false;
363 default:
364 break;
365 }
366 logger.log_debug("Extension header not comprehended. type={}", type);
367
368 uint8_t comp = static_cast<uint8_t>(type) >> 6U;
369 bool comp_not_needed =
370 !(comp == static_cast<uint8_t>(gtpu_comprehension::required_at_endpoint_not_intermediate_node) ||
371 comp == static_cast<uint8_t>(gtpu_comprehension::required_at_endpoint_and_intermediate_node));
372 if (comp_not_needed) {
373 logger.log_debug("Extension header not comprehended. type={}", type);
374 } else {
375 logger.log_error("Extension header not comprehended. type={}", type);
376 }
377 return comp_not_needed;
378}

◆ gtpu_extract_t_pdu()

byte_buffer srsran::gtpu_extract_t_pdu ( gtpu_dissected_pdu && dissected_pdu)

Extracts the T-PDU of a dissected GTP-U PDU by advancing its internal PDU buffer by the header length and returning that object. Any other content of the dissected PDU (e.g. header extensions) will be invalidated.

Parameters
dissected_pduThe dissected GTP-U PDU from which the T-PDU shall be extracted.
Returns
The T-PDU of the dissected GTP-U PDU.
381{
382 dissected_pdu.buf.trim_head(dissected_pdu.hdr_len);
383 return std::move(dissected_pdu.buf);
384}
void trim_head(size_t nof_bytes)
Removes "nof_bytes" from the head of the byte_buffer.
Definition byte_buffer.cpp:432

◆ gtpu_get_length()

uint16_t srsran::gtpu_get_length ( const gtpu_header & header,
const byte_buffer & sdu )
387{
388 uint16_t len = sdu.length();
389
390 if ((not header.ext_list.empty()) || header.flags.seq_number || header.flags.n_pdu) {
391 len += 4; // 4 bytes for optional part of the header
392 }
393
394 // extension header(s)
395 for (const gtpu_extension_header& ext : header.ext_list) {
396 len += 2; // 2 bytes for extension header/trailer
397 len += ext.container.length();
398 }
399
400 return len;
401}

◆ gtpu_read_ext_header()

bool srsran::gtpu_read_ext_header ( bit_decoder & decoder,
gtpu_extension_header & ext,
gtpu_extension_header_type & next_extension_header_type,
gtpu_tunnel_logger & logger )
256{
257 // TODO check valid read extension types
258
259 // Extract length indicator
260 uint8_t length = 0;
261 decoder.unpack(length, 8);
262
263 // TODO check valid length for the extension type
264
265 // The payload size is four bytes per the indicated length,
266 // minus one byte for the length field and one for the next
267 // extension header type. See section 5.2.1 of 29.281.
268 uint16_t payload = length * 4 - 2;
269
270 // TODO check max size
271
272 // Extract view to container
273 ext.container = decoder.unpack_aligned_bytes(payload);
274
275 // Extract next extension header type
276 gtpu_unpack_ext_header_type(decoder, next_extension_header_type);
277 return true;
278}
byte_buffer_view unpack_aligned_bytes(size_t n_bytes)
Definition bit_encoding.cpp:177
bool unpack(T &val, uint32_t n_bits)
Definition bit_encoding.cpp:121

◆ gtpu_read_teid()

bool srsran::gtpu_read_teid ( uint32_t & teid,
const byte_buffer & pdu,
srslog::basic_logger & logger )
133{
134 if (pdu.length() < GTPU_BASE_HEADER_LEN) {
135 logger.error(pdu.begin(), pdu.end(), "GTP-U PDU is too small. pdu_len={}", pdu.length());
136 return false;
137 }
138 teid = {};
139 byte_buffer_reader pdu_reader = pdu;
140 pdu_reader += 4;
141 for (int i = 3; i >= 0; --i) {
142 teid |= (*pdu_reader << (i * 8U));
143 ++pdu_reader;
144 }
145 return true;
146}

◆ gtpu_supported_flags_check()

bool srsran::gtpu_supported_flags_check ( const gtpu_header & header,
gtpu_tunnel_logger & logger )

Supported feature helpers.

312{
313 // flags
314 if (header.flags.version != GTPU_FLAGS_VERSION_V1) {
315 logger.log_error("Unhandled GTP-U version. {}", header.flags);
316 return false;
317 }
318 if (header.flags.protocol_type != GTPU_FLAGS_GTP_PROTOCOL) {
319 logger.log_error("Unhandled protocol type. {}", header.flags);
320 return false;
321 }
322 if (header.flags.n_pdu) {
323 logger.log_error("Unhandled packet number. {}", header.flags);
324 return false;
325 }
326 return true;
327}

◆ gtpu_supported_msg_type_check()

bool srsran::gtpu_supported_msg_type_check ( const gtpu_header & header,
gtpu_tunnel_logger & logger )
330{
331 // msg_tpye
332 if (header.message_type != GTPU_MSG_DATA_PDU && header.message_type != GTPU_MSG_ECHO_REQUEST &&
333 header.message_type != GTPU_MSG_ECHO_RESPONSE && header.message_type != GTPU_MSG_ERROR_INDICATION &&
334 header.message_type != GTPU_MSG_END_MARKER) {
335 logger.log_error("Unhandled message type. msg_type={:#x}", header.message_type);
336 return false;
337 }
338 return true;
339}

◆ gtpu_unpack_ext_header_type()

void srsran::gtpu_unpack_ext_header_type ( bit_decoder & decoder,
gtpu_extension_header_type & type )
304{
305 uint8_t tmp = 0;
306 decoder.unpack(tmp, 8);
307 type = static_cast<gtpu_extension_header_type>(tmp);
308}

◆ gtpu_write_ext_header()

bool srsran::gtpu_write_ext_header ( bit_encoder & encoder,
const gtpu_extension_header & ext,
gtpu_extension_header_type next_extension_header_type,
gtpu_tunnel_logger & logger )
284{
285 // TODO check valid write extension types
286
287 uint8_t payload = 1 + ext.container.length() + 1;
288 srsran_assert(payload % 4 == 0, "Invalid GTP-U extension size. payload={}", payload);
289
290 uint8_t length = payload / 4;
291
292 // Pack length
293 encoder.pack(length, 8);
294
295 // Pack container
296 encoder.pack_bytes(ext.container);
297
298 // Pack next header extension type
299 encoder.pack(static_cast<uint8_t>(next_extension_header_type), 8);
300 return true;
301}
bool pack_bytes(srsran::span< const uint8_t > bytes)
Definition bit_encoding.cpp:59
bool pack(uint64_t val, uint32_t n_bits)
Append provided bitmap into byte_buffer held by bit_encoder. The bitmap to pack is left aligned (i....
Definition bit_encoding.cpp:28

◆ gtpu_write_header()

bool srsran::gtpu_write_header ( byte_buffer & pdu,
const gtpu_header & header,
gtpu_tunnel_logger & logger )

Prepends the GTP-U header in front of a GTP-U PDU. Ref: TS 29.281 Sec.

Parameters
[out]pduBuffer of the GTP-U PDU to which the information element shall be prepended.
[in]headerThe GTP-U header.
[in]loggerAccess to the logger.
Returns
True if write was successful, False otherwise.
47{
48 // flags
49 if (!gtpu_supported_flags_check(header, logger)) {
50 logger.log_error("Unhandled GTP-U flags. {}", header.flags);
51 return false;
52 }
53
54 // msg type
55 if (!gtpu_supported_msg_type_check(header, logger)) {
56 logger.log_error("Unhandled GTP-U message type. msg_type={:#x}", header.message_type);
57 return false;
58 }
59
60 byte_buffer hdr_buf;
61 bit_encoder encoder{hdr_buf};
62
63 // Flags
64 encoder.pack(header.flags.version, 3);
65 encoder.pack(header.flags.protocol_type, 1);
66 encoder.pack(0, 1); // Reserved
67 encoder.pack(header.ext_list.empty() ? 0 : 1, 1); // E
68 encoder.pack(header.flags.seq_number ? 1 : 0, 1); // S
69 encoder.pack(header.flags.n_pdu ? 1 : 0, 1); // PN
70
71 // Message type
72 encoder.pack(header.message_type, 8);
73
74 // Length
75 uint16_t length = gtpu_get_length(header, pdu);
76 encoder.pack(length, 16);
77
78 // TEID
79 encoder.pack(header.teid.value(), 32);
80
81 // Optional header fields
82 if ((not header.ext_list.empty()) || header.flags.seq_number || header.flags.n_pdu) {
83 // Sequence Number
84 encoder.pack(header.seq_number, 16);
85
86 // N-PDU
87 encoder.pack(header.n_pdu, 8);
88
89 // Next Extension Header Type
90 if (header.ext_list.empty()) {
91 encoder.pack(static_cast<uint8_t>(gtpu_extension_header_type::no_more_extension_headers), 8);
92 } else {
93 encoder.pack(static_cast<uint8_t>(header.ext_list[0].extension_header_type), 8);
94 }
95 }
96
97 // Write header extensions
98 for (unsigned i = 0; i < header.ext_list.size(); ++i) {
99 if (i == (header.ext_list.size() - 1)) {
100 gtpu_write_ext_header(encoder, header.ext_list[i], gtpu_extension_header_type::no_more_extension_headers, logger);
101 } else {
102 gtpu_write_ext_header(encoder, header.ext_list[i], header.ext_list[i + 1].extension_header_type, logger);
103 }
104 }
105
106 pdu.prepend(std::move(hdr_buf));
107 return true;
108}
bool prepend(span< const uint8_t > bytes)
Prepends bytes to byte_buffer. This function may allocate new segments.
Definition byte_buffer.cpp:328

◆ gtpu_write_ie_private_extension()

void srsran::gtpu_write_ie_private_extension ( byte_buffer & pdu,
gtpu_ie_private_extension & ie_priv_ext,
gtpu_tunnel_logger & logger )

Append the "private extension" information element to a GTP-U PDU. Ref: TS 29.281 Sec. 8.6.

Parameters
[out]pduBuffer of the GTP-U PDU to which the information element shall be appended.
[in]ie_recoveryThe information element "private extension".
[in]loggerAccess to the logger.
121{
122 logger.log_debug("Writing IE private extension.");
123 bit_encoder enc{pdu};
124 enc.pack(static_cast<uint8_t>(gtpu_information_element_type::private_extension), 8); // type
125 enc.pack(static_cast<uint16_t>(ie_priv_ext.extension_value.size() + 2), 16); // length
126 enc.pack(ie_priv_ext.extension_identifier, 16); // ext. identifier
127 for (const uint8_t& v : ie_priv_ext.extension_value) { // ext. value
128 enc.pack(v, 8);
129 }
130}
Encoder of bits in a byte buffer.
Definition bit_encoding.h:32
static_vector< uint8_t, GTPU_PRIVATE_EXTENSION_VALUE_LENGTH > extension_value
Custom extension.
Definition gtpu_pdu.h:184
uint16_t extension_identifier
The Extension Identifier is a value defined in the Private Enterprise number list.
Definition gtpu_pdu.h:182

◆ gtpu_write_ie_recovery()

void srsran::gtpu_write_ie_recovery ( byte_buffer & pdu,
gtpu_ie_recovery & ie_recovery,
gtpu_tunnel_logger & logger )

Append the "recovery" information element to a GTP-U PDU. Ref: TS 29.281 Sec. 8.2.

Parameters
[out]pduBuffer of the GTP-U PDU to which the information element shall be appended.
[in]ie_recoveryThe information element "recovery".
[in]loggerAccess to the logger.
111{
112 logger.log_debug("Writing IE recovery. restart_counter={}", ie_recovery.restart_counter);
113 bit_encoder enc{pdu};
114 enc.pack(static_cast<uint8_t>(gtpu_information_element_type::recovery), 8); // type
115 enc.pack(ie_recovery.restart_counter, 8); // restart counter
116}
uint8_t restart_counter
Definition gtpu_pdu.h:175

◆ hard_decision()

void srsran::hard_decision ( bit_buffer & hard_bits,
span< const log_likelihood_ratio > soft_bits )

Obtains hard bits from a vector of soft bits.

Performs hard decision on a vector of soft bits. The resulting bits are packed and stored in an srsran::bit_buffer.

Parameters
[out]hard_bitsBuffer of hard bits.
[in]soft_bitsBuffer of soft bits.
226{
227 // Make sure that there is enough space in the output to accommodate the hard bits.
228 srsran_assert(soft_bits.size() <= hard_bits.size(),
229 "Input size (i.e., {}) does not fit into the output buffer with size {}",
230 soft_bits.size(),
231 hard_bits.size());
232
233 unsigned nof_bits = soft_bits.size();
234
235#if defined(__AVX2__) || defined(HAVE_NEON)
236
237 hard_decision_simd(hard_bits, reinterpret_cast<const int8_t*>(soft_bits.data()), nof_bits);
238
239#else
240 for (unsigned i_bit = 0; i_bit != nof_bits; ++i_bit) {
241 // Compute hard bit.
242 uint8_t hard_bit = soft_bits[i_bit].to_hard_bit();
243
244 // Insert into the bit buffer.
245 hard_bits.insert(hard_bit, i_bit, 1);
246 }
247#endif // __AVX2__ or HAVE_NEON
248}
constexpr pointer data() const noexcept
Returns a pointer to the beginning of the sequence.
Definition span.h:201

◆ has_active_tdd_dl_symbols()

bool srsran::has_active_tdd_dl_symbols ( const tdd_ul_dl_config_common & cfg,
unsigned slot_index )

Calculates whether there are symbols for DL in the current slot index.

64{
65 return nof_active_symbols(cfg, slot_index, cyclic_prefix::NORMAL, true) > 0;
66}

◆ has_active_tdd_ul_symbols()

bool srsran::has_active_tdd_ul_symbols ( const tdd_ul_dl_config_common & cfg,
unsigned slot_index )

Calculates whether there are symbols for UL in the current slot index.

69{
70 return nof_active_symbols(cfg, slot_index, cyclic_prefix::NORMAL, false) > 0;
71}

◆ has_unique_ids() [1/2]

template<typename Range , typename IdentifierGetter >
bool srsran::has_unique_ids ( const Range & r,
const IdentifierGetter & id_get )

Check if all elements of a range have a unique ID, which is provided via id_get.

Parameters
[in]Rangewith begin() and end().
[in]id_getCallback with signature "id_type(const Range::value_type&)" that returns back an element identifier.
Returns
True if all elements in the range have a unique identifier.
52{
53 for (auto it = r.begin(); it != r.end(); ++it) {
54 auto it2 = it;
55 ++it2;
56 for (; it2 != r.end(); ++it2) {
57 if (id_get(*it) == id_get(*it2)) {
58 return false;
59 }
60 }
61 }
62 return true;
63}

◆ has_unique_ids() [2/2]

template<typename Range , typename ValueType = typename Range::value_type, typename IdType >
bool srsran::has_unique_ids ( const Range & r,
IdType ValueType::* id_field )

Check if all elements of a range have a unique ID, where the ID can be accessed via the provided field pointer.

Parameters
[in]Rangewith begin() and end().
[in]id_fieldMember pointer used to get ID of elements of provided Range.
Returns
True if all elements in the range have a unique identifier.
72{
73 return has_unique_ids(r, [id_field](const auto& e) { return e.*id_field; });
74}

◆ init_byte_buffer_segment_pool()

void srsran::init_byte_buffer_segment_pool ( std::size_t nof_segments,
std::size_t memory_block_size = byte_buffer_segment_pool_default_segment_size() )

Sets the default size of the default byte_buffer segment pool.

This function asserts if the pool has already been initialized.

Parameters
nof_segmentsNumber of byte_buffer_segments stored in the pool.
memory_block_sizeNumber, in bytes, for each memory block on which a buffer_byte_segment header and payload will be stored.
45{
46 auto& pool = detail::byte_buffer_segment_pool::get_instance(nof_segments, memory_block_size);
47 report_fatal_error_if_not(nof_segments == pool.nof_memory_blocks(),
48 "The pool was already initialized with a different number of segments ({} != {})",
49 nof_segments,
50 pool.nof_memory_blocks());
51 report_fatal_error_if_not(memory_block_size > 64U, "memory blocks must be larger than the segment control header");
52}
static fixed_size_memory_block_pool< IdTag, DebugSanitizeAddress > & get_instance(size_t nof_blocks=0, size_t mem_block_size=0)
Get instance of a memory pool singleton.
Definition fixed_size_memory_block_pool.h:130

◆ int_to_gnb_cu_cp_ue_e1ap_id()

constexpr gnb_cu_cp_ue_e1ap_id_t srsran::int_to_gnb_cu_cp_ue_e1ap_id ( uint64_t idx)
inlineconstexpr

Convert integer to GNB-CU-CP-UE-E1AP-ID type.

52{
53 return static_cast<gnb_cu_cp_ue_e1ap_id_t>(idx);
54}

◆ int_to_gnb_cu_ue_f1ap_id()

constexpr gnb_cu_ue_f1ap_id_t srsran::int_to_gnb_cu_ue_f1ap_id ( uint64_t idx)
inlineconstexpr

Convert integer to GNB-CU-UE-F1AP-ID type.

43{
44 return static_cast<gnb_cu_ue_f1ap_id_t>(idx);
45}

◆ int_to_gnb_cu_up_ue_e1ap_id()

constexpr gnb_cu_up_ue_e1ap_id_t srsran::int_to_gnb_cu_up_ue_e1ap_id ( uint64_t idx)
inlineconstexpr

Convert integer to GNB-DU-UE-E1AP-ID type.

68{
69 return static_cast<gnb_cu_up_ue_e1ap_id_t>(idx);
70}

◆ int_to_gnb_du_id()

gnb_du_id_t srsran::int_to_gnb_du_id ( uint64_t id)
inline
33{
34 return static_cast<gnb_du_id_t>(id);
35}
gnb_du_id_t
Global NodeB DU ID as per TS 38.473.
Definition gnb_du_id.h:30

◆ int_to_gnb_du_ue_f1ap_id()

constexpr gnb_du_ue_f1ap_id_t srsran::int_to_gnb_du_ue_f1ap_id ( uint64_t idx)
inlineconstexpr

Convert integer to GNB-DU-UE-F1AP-ID type.

59{
60 return static_cast<gnb_du_ue_f1ap_id_t>(idx);
61}

◆ int_to_gtpu_teid()

constexpr gtpu_teid_t srsran::int_to_gtpu_teid ( uint32_t teid_val)
constexpr

◆ int_to_srb_id()

srb_id_t srsran::int_to_srb_id ( std::underlying_type_t< srb_id_t > val)
inline
77{
78 return static_cast<srb_id_t>(val);
79}

◆ integrity_algorithm_to_e1ap_asn1()

asn1::e1ap::integrity_protection_algorithm_e srsran::integrity_algorithm_to_e1ap_asn1 ( const srsran::security::integrity_algorithm & int_algo)
inline

Converts type integrity_algorithm to an E1AP ASN.1 type.

Parameters
int_algoIntegrity Protection Algorithm object.
Returns
The E1AP ASN.1 object where the result of the conversion is stored.
103{
105
106 switch (int_algo) {
107 case srsran::security::integrity_algorithm::nia0:
108 asn1_int_algo = asn1::e1ap::integrity_protection_algorithm_opts::nia0;
109 break;
110 case srsran::security::integrity_algorithm::nia1:
111 asn1_int_algo = asn1::e1ap::integrity_protection_algorithm_opts::i_neg128_nia1;
112 break;
113 case srsran::security::integrity_algorithm::nia2:
114 asn1_int_algo = asn1::e1ap::integrity_protection_algorithm_opts::i_neg128_nia2;
115 break;
116 case srsran::security::integrity_algorithm::nia3:
117 asn1_int_algo = asn1::e1ap::integrity_protection_algorithm_opts::i_neg128_nia3;
118 break;
119 default:
120 srsran_assert(false, "Invalid integrity protection algorithm ({})", int_algo);
121 }
122
123 return asn1_int_algo;
124}

◆ interval_function()

template<typename Table >
float srsran::interval_function ( float value,
float rcp_noise,
float interval_width,
unsigned nof_intervals,
const Table & slopes,
const Table & intercepts )
inline

Applies an interval function.

Template Parameters
TableLook-up table type. All tables mut be of the same type.
Parameters
[in]valueInput value.
[in]rcp_noiseThe noise reciprocal corresponding to the value.
[in]nof_intervalsNumber of intervals.
[in]interval_widthInterval width to quantify the interval index.
[in]slopesTable with the slope of each interval.
[in]interceptsTable with the interception points of each interval.
Returns
The results of the interval function.
Remarks
The number of intervals must be lower than or equal to Table size.
59{
60 unsigned idx = compute_interval_idx(value, interval_width, nof_intervals);
61 float l_value = slopes[idx] * value + intercepts[idx];
62 l_value *= rcp_noise;
63 return l_value;
64}
unsigned compute_interval_idx(float value, float interval_width, unsigned nof_intervals)
Helper function to calculate an interval index from floating point value.
Definition demodulation_mapper_intervals.h:34

◆ is_aligned() [1/2]

constexpr bool srsran::is_aligned ( std::uintptr_t ptr,
std::size_t alignment )
inlineconstexpr

Checks whether the pointer is set with the correct alignment.

37{
38 return (ptr & (alignment - 1)) == 0;
39}

◆ is_aligned() [2/2]

bool srsran::is_aligned ( void * ptr,
std::size_t alignment )
inline
41{
42 return is_aligned(reinterpret_cast<std::uintptr_t>(ptr), alignment);
43}
constexpr bool is_aligned(std::uintptr_t ptr, std::size_t alignment)
Checks whether the pointer is set with the correct alignment.
Definition memory_pool_utils.h:36

◆ is_alignment_valid()

constexpr bool srsran::is_alignment_valid ( std::size_t alignment)
constexpr

Checks if alignment is power of 2.

31{
32 return alignment > 0 && (alignment & (alignment - 1U)) == 0U;
33}

◆ is_cell_id_required()

bool srsran::is_cell_id_required ( const e2sm_kpm_metric_t & metric)
inline
67{
68 // Cell ID is required if metric belongs to a measurement object class confined in a single cell.
69 if (metric.meas_obj == NRCellCU) {
70 return true;
71 }
72
73 if (metric.meas_obj == NRCellDU) {
74 return true;
75 }
76
77 // Cell ID is not needed if metric is cell agnostic (e.g., GNBCUUPFunction).
78 return false;
79}

◆ is_common_search_space()

bool srsran::is_common_search_space ( search_space_set_type ss_set)
inline

Checks whether the SearchSpace set is common or dedicated.

52{
53 return ss_set != search_space_set_type::ue_specific;
54}

◆ is_crnti()

constexpr bool srsran::is_crnti ( rnti_t rnti)
constexpr

Checks whether RNTI value corresponds to a C-RNTI value.

46{
47 return rnti <= rnti_t::MAX_CRNTI and rnti >= rnti_t::MIN_CRNTI;
48}

◆ is_du_cell_config_valid()

check_outcome srsran::is_du_cell_config_valid ( const du_cell_config & cell_cfg)

Checks whether the provided DU cell configuration is valid.

Parameters
cell_cfgDU cell configuration.
Returns
in case an invalid parameter is detected, returns a string containing an error message.
558{
559 CHECK_EQ_OR_BELOW(cell_cfg.pci, MAX_PCI, "cell PCI");
560 CHECK_EQ_OR_BELOW(cell_cfg.scs_common, subcarrier_spacing::kHz120, "SCS common");
561 HANDLE_ERROR(is_coreset0_ss0_idx_valid(cell_cfg));
562 HANDLE_ERROR(check_dl_config_common(cell_cfg));
563 HANDLE_ERROR(check_ul_config_common(cell_cfg));
564 HANDLE_ERROR(check_ssb_configuration(cell_cfg));
565 HANDLE_ERROR(check_tdd_ul_dl_config(cell_cfg));
566 const pucch_builder_params& pucch_cfg = cell_cfg.pucch_cfg;
567 HANDLE_ERROR(srs_du::pucch_parameters_validator(pucch_cfg.nof_ue_pucch_f1_res_harq.to_uint(),
568 pucch_cfg.nof_ue_pucch_f2_res_harq.to_uint(),
569 pucch_cfg.f1_params,
570 pucch_cfg.f2_params,
571 cell_cfg.dl_cfg_common.init_dl_bwp.generic_params.crbs.length()));
572 HANDLE_ERROR(config_validators::validate_csi_meas_cfg(cell_cfg.ue_ded_serv_cell_cfg, cell_cfg.tdd_ul_dl_cfg_common));
573 HANDLE_ERROR(check_dl_config_dedicated(cell_cfg));
574 HANDLE_ERROR(check_ul_config_dedicated(cell_cfg));
575 // TODO: Remaining.
576 return {};
577}
subcarrier_spacing scs_common
subcarrierSpacing for common, used for initial access and broadcast message.
Definition du_cell_config.h:126
serving_cell_config ue_ded_serv_cell_cfg
UE-dedicated serving cell configuration.
Definition du_cell_config.h:160
dl_config_common dl_cfg_common
Cell-specific DL and UL configuration used by common searchSpaces.
Definition du_cell_config.h:153
optional< tdd_ul_dl_config_common > tdd_ul_dl_cfg_common
Defines the TDD DL-UL pattern and periodicity. If no value is set, the cell is in FDD mode.
Definition du_cell_config.h:157
pucch_builder_params pucch_cfg
Parameters for PUCCH-Config generation.
Definition du_cell_config.h:169
pucch_f1_params f1_params
PUCCH Format specific parameters.
Definition du_cell_config.h:94
bounded_integer< unsigned, 1, 8 > nof_ue_pucch_f1_res_harq
Definition du_cell_config.h:79

◆ is_du_ue_index_valid()

constexpr bool srsran::is_du_ue_index_valid ( du_ue_index_t ue_idx)
inlineconstexpr
54{
55 return ue_idx < MAX_NOF_DU_UES;
56}

◆ is_lcid_valid()

bool srsran::is_lcid_valid ( lcid_t lcid)
inline
67{
68 return lcid <= MAX_LCID;
69}
constexpr lcid_t MAX_LCID
Definition lcid.h:50

◆ is_long_preamble() [1/2]

constexpr bool srsran::is_long_preamble ( prach_format_type type)
constexpr

Checks if the preamble format is long.

Long preambles are listed in TS38.211 Table 6.3.3.1-1.

107{
108 return (type <= prach_format_type::three);
109}
Here is the caller graph for this function:

◆ is_long_preamble() [2/2]

constexpr bool srsran::is_long_preamble ( prach_subcarrier_spacing ra_scs)
inlineconstexpr

Checks if the RA subcarrier spacing is suitable for long preambles formats.

41{
42 return (ra_scs != prach_subcarrier_spacing::invalid) && (ra_scs >= prach_subcarrier_spacing::kHz1_25);
43}

◆ is_nth_ssb_beam_active()

bool srsran::is_nth_ssb_beam_active ( uint64_t ssb_bitmap,
unsigned ssb_index )
inline

Helper function that determines from SSB bitmap whether n-th beam is used.

Parameters
[in]ssb_bitmapSSB bitmap.
[in]ssb_indexSSB block index/ Beam index.
Returns
true if SSB block/ Beam at index ssb_index is active, false otherwise.
32{
33 // In the current implementation state, only SSB indices within the interval [0, 7] are allowed.
34 srsran_sanity_check(
35 ssb_index >= 0 and ssb_index < MAX_NUM_BEAMS, "SSB index must be within the interval [0, '{}')", MAX_NUM_BEAMS);
36 return (ssb_bitmap & (static_cast<uint64_t>(0b1U) << static_cast<uint64_t>(63U - ssb_index))) > 0;
37}

◆ is_pusch_configured()

bool srsran::is_pusch_configured ( const csi_meas_config & csi_meas)

Tells whether the CSI report is configured for PUSCH.

Remarks
There is no explicit statement defining this in the TS; however, we can infer from reportConfigType in CSI-ReportConfig, TS 38.331, that the CSI report is configured for PUSCH if it is either semiPersistentOnPUSCH or aperiodic, while it's configured for PUCCH if it is periodic or semiPersistentOnPUCCH.
126{
127 srsran_assert(csi_meas.csi_report_cfg_list.size() == 1, "Only one CSI report configuration is supported");
129 csi_meas.csi_report_cfg_list[0].report_cfg_type);
130}

◆ is_scheduler_expert_config_valid()

error_type< std::string > srsran::is_scheduler_expert_config_valid ( const scheduler_expert_config & config)

Checks whether the provided scheduler expert configuration is valid.

Parameters
configScheduler expert configuration.
Returns
In case an invalid parameter is detected, returns a string containing an error message.
37{
38 // :TODO: Implement me!
39 return {};
40}

◆ is_scs_valid() [1/3]

constexpr bool srsran::is_scs_valid ( prach_subcarrier_spacing scs)
inlineconstexpr

Checks if SCS value is valid.

35{
36 return scs < prach_subcarrier_spacing::invalid;
37}

◆ is_scs_valid() [2/3]

constexpr bool srsran::is_scs_valid ( subcarrier_spacing scs)
inlineconstexpr

Check if SCS value is valid.

38{
39 return scs <= subcarrier_spacing::kHz240;
40}

◆ is_scs_valid() [3/3]

constexpr bool srsran::is_scs_valid ( subcarrier_spacing scs,
frequency_range fr )
inlineconstexpr

Checks whether the provided SCS–FR pair is valid.

44{
45 return is_scs_valid(scs) and (((fr == frequency_range::FR2) and scs >= subcarrier_spacing::kHz60) or
46 ((fr == frequency_range::FR1) and scs <= subcarrier_spacing::kHz60));
47}

◆ is_short_preamble() [1/2]

constexpr bool srsran::is_short_preamble ( prach_format_type type)
constexpr

Checks if the preamble format is short.

Short preambles are listed in TS38.211 Table 6.3.3.1-2.

115{
116 return (type < prach_format_type::invalid) && (type >= prach_format_type::A1);
117}

◆ is_short_preamble() [2/2]

constexpr bool srsran::is_short_preamble ( prach_subcarrier_spacing ra_scs)
inlineconstexpr

Checks if the RA subcarrier spacing is suitable for short preambles formats.

47{
48 return (ra_scs != prach_subcarrier_spacing::invalid) && (ra_scs < prach_subcarrier_spacing::kHz1_25);
49}

◆ is_simd_addr_aligned()

bool srsran::is_simd_addr_aligned ( const void * addr,
uintptr_t mask )
inline
55{
56 uintptr_t addr_i = reinterpret_cast<uintptr_t>(addr);
57 return (addr_i & mask) == 0;
58}

◆ is_srb()

bool srsran::is_srb ( lcid_t lcid)
inline
62{
63 return lcid <= LCID_SRB3;
64}

◆ is_tdd_full_dl_slot()

bool srsran::is_tdd_full_dl_slot ( const tdd_ul_dl_config_common & cfg,
unsigned slot_index )

Checks if all symbols in the current slot index are active for DL.

74{
75 return nof_active_symbols(cfg, slot_index, cyclic_prefix::NORMAL, true) == NOF_OFDM_SYM_PER_SLOT_NORMAL_CP;
76}

◆ is_tdd_full_ul_slot()

bool srsran::is_tdd_full_ul_slot ( const tdd_ul_dl_config_common & cfg,
unsigned slot_index )

Checks if all symbols in the current slot index are active for UL.

79{
80 return nof_active_symbols(cfg, slot_index, cyclic_prefix::NORMAL, false) == NOF_OFDM_SYM_PER_SLOT_NORMAL_CP;
81}

◆ is_trace_file_open()

bool srsran::is_trace_file_open ( )

Check if the trace file is open.

158{
159 return trace_file_writer != nullptr;
160}

◆ is_valid() [1/2]

bool srsran::is_valid ( const csi_report_configuration & config)

CSI report configuration validator.

90{
91 // The number of CSI resources in the corresponding resource set must be at least one and up to 64 (see TS38.331
92 // Section 6.3.2, Information Element \c NZP-CSI-RS-ResourceSet).
94 if (!nof_csi_res_range.contains(config.nof_csi_rs_resources)) {
95 return false;
96 }
97
98 // The PMI codebook type is not supported.
99 if (config.pmi_codebook == pmi_codebook_type::other) {
100 return false;
101 }
102
103 if (config.pmi_codebook != pmi_codebook_type::one) {
105
106 // The RI restriction set size is too small to cover all possible ranks given the number of CSI-RS ports.
107 if (config.ri_restriction.size() < nof_csi_rs_ports) {
108 return false;
109 }
110
111 // The RI Restriction set cannot allow a higher rank than the number of CSI-RS ports.
112 if (config.ri_restriction.find_highest() >= static_cast<int>(nof_csi_rs_ports)) {
113 return false;
114 }
115 }
116
117 // The CSI report quantities are not supported.
118 if (config.quantities == csi_report_quantities::other) {
119 return false;
120 }
121
122 return true;
123}

◆ is_valid() [2/2]

bool srsran::is_valid ( const ru_generic_configuration & config)
inline

Helper function that validates the pointer members of the given Radio Unit configuration. Returns true on success, otherwise false.

The pointers to baseband gateway, rx symbol notifier, timing notifier and error notifier are not being checked as the Radio Unit factory still needs to create the adapters and set them in the lower PHY configuration.

35{
36 if (!config.symbol_notifier) {
37 return false;
38 }
39
40 if (!config.timing_notifier) {
41 return false;
42 }
43
44 if (!config.rf_logger) {
45 return false;
46 }
47
48 if (!config.radio_exec) {
49 return false;
50 }
51
52 if (!config.statistics_printer_executor) {
53 return false;
54 }
55
56 for (const auto& low_cfg : config.lower_phy_config) {
57 if (!low_cfg.rx_task_executor) {
58 return false;
59 }
60
61 if (!low_cfg.tx_task_executor) {
62 return false;
63 }
64
65 if (!low_cfg.dl_task_executor) {
66 return false;
67 }
68
69 if (!low_cfg.ul_task_executor) {
70 return false;
71 }
72
73 if (!low_cfg.prach_async_executor) {
74 return false;
75 }
76 }
77
78 return true;
79}

◆ is_valid_lower_phy_config()

bool srsran::is_valid_lower_phy_config ( const lower_phy_configuration & config)
inline

Returns true if the given lower PHY configuration is valid, otherwise false.

138{
139 // :TODO: Implement me!
140
141 return true;
142}

◆ is_valid_ru_ofh_config()

bool srsran::is_valid_ru_ofh_config ( const ru_ofh_configuration & config)

Returns true if the given Open Fronthaul configuration is valid, otherwise false.

98{
99 for (const auto& sector : config.sector_configs) {
100 if (!check_compression_params(sector.ul_compression_params)) {
101 return false;
102 }
103
104 if (!check_compression_params(sector.dl_compression_params)) {
105 return false;
106 }
107
108 if (!check_compression_params(sector.prach_compression_params)) {
109 return false;
110 }
111
112 if (!check_dl_eaxc_if_broadcast_is_enabled(sector)) {
113 return false;
114 }
115
116 if (!check_eaxcs_id(sector)) {
117 return false;
118 }
119 }
120
121 return true;
122}

◆ is_valid_upper_phy_config()

bool srsran::is_valid_upper_phy_config ( const upper_phy_config & config)
inline

Returns true if the given upper PHY configuration is valid, otherwise false.

323{
324 // :TODO: Implement me!
325 return true;
326}

◆ launch_async() [1/2]

template<typename FunT , typename... Args>
auto srsran::launch_async ( Args &&... args) -> typename detail::future_of<FunT>

Creates coroutine frame and launches task if eager.

337{
338 auto* frame = new detail::coro_frame<FunT>(std::forward<Args>(args)...);
339 return frame->promise().get_return_object();
340}
Coroutine Frame. Besides the coro state and promise, it stores the coroutine function.
Definition coroutine.h:192

◆ launch_async() [2/2]

template<typename FunT >
auto srsran::launch_async ( FunT && f) -> typename detail::future_of<FunT>

Creates coroutine frame and launches task if eager.

345{
346 auto* frame = new detail::coro_frame<FunT>(std::forward<FunT>(f));
347 return frame->promise().get_return_object();
348}

◆ launch_no_op_task() [1/2]

async_task< void > srsran::launch_no_op_task ( )
inline

Launches an async task that finishes immediately with the result set by the caller to this function.

41{
43 CORO_BEGIN(ctx);
44 CORO_RETURN();
45 });
46}

◆ launch_no_op_task() [2/2]

template<typename Resp >
async_task< std::decay_t< Resp > > srsran::launch_no_op_task ( Resp && r)

Launches an async task that finishes immediately with the result set by the caller to this function.

32{
33 return launch_async([r = std::forward<Resp>(r)](coro_context<async_task<Resp>>& ctx) {
34 CORO_BEGIN(ctx);
35 CORO_RETURN(r);
36 });
37}

◆ lc_sr_delay_timer_to_value()

std::underlying_type< periodic_bsr_timer >::type srsran::lc_sr_delay_timer_to_value ( logical_channel_sr_delay_timer timer)
inline

Return the value of logical_channel_sr_delay_timer.

177{
178 return static_cast<std::underlying_type<periodic_bsr_timer>::type>(timer);
179}

◆ lcm() [1/2]

template<typename Integer >
Integer srsran::lcm ( Integer a,
Integer b )

Calculates the least common multiplier (LCM) of two integers.

49{
50 Integer temp = gcd(a, b);
51
52 return temp != 0 ? (a / temp * b) : 0;
53}
Integer gcd(Integer a, Integer b)
Calculates the greatest common divisor (GCD) of two integers.
Definition gcd.h:32

◆ lcm() [2/2]

template<typename Integer >
Integer srsran::lcm ( span< const Integer > values)

Calculates the least common multiplier (LCM) for a range of integers.

58{
59 return std::accumulate(
60 values.begin(), values.end(), Integer(1), [](Integer a, Integer b) { return lcm<Integer>(a, b); });
61}
constexpr iterator end() const noexcept
Returns an iterator to the element following the last element of the span.
Definition span.h:207

◆ lexical_cast()

template<typename T >
bool srsran::lexical_cast ( const std::string & in,
srsran::optional< T > & output )

Parse string into optional type.

33{
34 using CLI::detail::lexical_cast;
35
36 T val;
37 if (not lexical_cast(in, val)) {
38 return false;
39 }
40 output = val;
41 return true;
42}
bool lexical_cast(const std::string &in, srsran::optional< T > &output)
Parse string into optional type.
Definition cli11_utils.h:32

◆ log2_ceil()

template<typename Integer >
constexpr Integer srsran::log2_ceil ( Integer value)
inlineconstexpr

Calculates $\left \lceil log_2(n) \right \rceil$.

Template Parameters
IntegerAny unsigned integer type.
Parameters
[in]valueParameter $n$.
Returns
The result of the calculation if value is not zero. Otherwise 0.
83{
84 static_assert(std::is_unsigned<Integer>::value, "log2_ceil only works for unsigned integers");
85
86 // Avoid unbounded results.
87 if (value == 0) {
88 return 0;
89 }
90 return static_cast<Integer>(std::ceil(std::log2(static_cast<float>(value))));
91}

◆ log_proc_completed()

void srsran::log_proc_completed ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
rnti_t rnti,
const char * proc_name )
inline
98{
99 logger.debug("{}: \"{}\" completed.", ue_event_prefix{"CTRL", ue_index, rnti}, proc_name);
100}
Definition gnb_format.h:33

◆ log_proc_event()

template<typename... Args>
void srsran::log_proc_event ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
const char * proc_name,
const char * cause_fmt,
Args &&... args )
139{
140 if (not logger.debug.enabled()) {
141 return;
142 }
143 fmt::memory_buffer fmtbuf;
144 fmt::format_to(fmtbuf, cause_fmt, std::forward<Args>(args)...);
145 logger.debug("{}: {}", ue_event_prefix{"CTRL", ue_index}, to_c_str(fmtbuf));
146}

◆ log_proc_failure() [1/2]

template<typename... Args>
void srsran::log_proc_failure ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
const char * proc_name,
const char * cause_fmt = "",
Args &&... args )
108{
109 fmt::memory_buffer fmtbuf;
110 if (strcmp(cause_fmt, "") != 0) {
111 fmt::format_to(fmtbuf, "Cause: ");
112 fmt::format_to(fmtbuf, cause_fmt, std::forward<Args>(args)...);
113 }
114 logger.warning("{}: \"{}\" failed. {}", ue_event_prefix{"CTRL", ue_index}, proc_name, to_c_str(fmtbuf));
115}

◆ log_proc_failure() [2/2]

template<typename... Args>
void srsran::log_proc_failure ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
rnti_t rnti,
const char * proc_name,
const char * cause_fmt = "",
Args &&... args )
124{
125 fmt::memory_buffer fmtbuf;
126 if (strcmp(cause_fmt, "") != 0) {
127 fmt::format_to(fmtbuf, "Cause: ");
128 fmt::format_to(fmtbuf, cause_fmt, std::forward<Args>(args)...);
129 }
130 logger.warning("{}: \"{}\" failed. {}", ue_event_prefix{"CTRL", ue_index, rnti}, proc_name, to_c_str(fmtbuf));
131}

◆ log_proc_started() [1/2]

void srsran::log_proc_started ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
const char * proc_name )
inline
93{
94 logger.debug("{}: \"{}\" started.", ue_event_prefix{"CTRL", ue_index}, proc_name);
95}

◆ log_proc_started() [2/2]

void srsran::log_proc_started ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
rnti_t rnti,
const char * proc_name )
inline
88{
89 logger.debug("{}: \"{}\" started.", ue_event_prefix{"CTRL", ue_index, rnti}, proc_name);
90}

◆ log_ue_event()

template<typename... Args>
void srsran::log_ue_event ( srslog::basic_logger & logger,
const ue_event_prefix & ue_prefix,
const char * cause_fmt,
Args &&... args )
150{
151 if (not logger.debug.enabled()) {
152 return;
153 }
154 fmt::memory_buffer fmtbuf;
155 fmt::format_to(fmtbuf, cause_fmt, std::forward<Args>(args)...);
156 logger.debug("{}: {}", ue_prefix, to_c_str(fmtbuf));
157}

◆ log_ue_proc_event()

template<typename... Args>
void srsran::log_ue_proc_event ( srslog::log_channel & log_ch,
const ue_event_prefix & ue_prefix,
const char * proc_name,
const char * cause_fmt,
Args &&... args )
165{
166 if (not log_ch.enabled()) {
167 return;
168 }
169 fmt::memory_buffer fmtbuf;
170 fmt::format_to(fmtbuf, "\"{}\" ", proc_name);
171 fmt::format_to(fmtbuf, cause_fmt, std::forward<Args>(args)...);
172 log_ch("{}: {}", ue_prefix, to_c_str(fmtbuf));
173}
bool enabled() const
Definition log_channel.h:108

◆ log_ul_pdu() [1/2]

template<typename... Args>
void srsran::log_ul_pdu ( srslog::basic_logger & logger,
du_ue_index_t ue_index,
rnti_t rnti,
du_cell_index_t cell_index,
const char * ch,
const char * cause_fmt,
Args &&... args )
183{
184 log_ue_event(logger, ue_event_prefix{"UL", ue_index, rnti, cell_index, ch}, cause_fmt, std::forward<Args>(args)...);
185}

◆ log_ul_pdu() [2/2]

template<typename... Args>
void srsran::log_ul_pdu ( srslog::basic_logger & logger,
rnti_t rnti,
du_cell_index_t cc,
const char * cause_fmt,
Args &&... args )
189{
190 log_ue_event(logger, ue_event_prefix{"UL", MAX_NOF_DU_UES, rnti, cc}, cause_fmt, std::forward<Args>(args)...);
191}

◆ make_byte_buffer()

byte_buffer srsran::make_byte_buffer ( const std::string & hex_str)
inline

Converts a hex string (e.g. 01FA02) to a byte buffer.

642{
643 srsran_assert(hex_str.size() % 2 == 0, "The number of hex digits must be even");
644 byte_buffer ret;
645 for (size_t i = 0; i < hex_str.size(); i += 2) {
646 uint8_t val;
647 sscanf(hex_str.data() + i, "%02hhX", &val);
648 if (not ret.append(val)) {
649 ret.clear();
650 break;
651 }
652 }
653 return ret;
654}
Byte sequence, which represents its data in memory via an intrusive linked list of memory chunks....
Definition byte_buffer.h:150
SRSRAN_NODISCARD bool append(Iterator begin, Iterator end)
Append bytes of a iterator range.
Definition byte_buffer.h:242
void clear()
Clear byte buffer.
Definition byte_buffer.h:316

◆ make_cu_up_executor_mapper()

std::unique_ptr< cu_up_executor_pool > srsran::make_cu_up_executor_mapper ( span< task_executor * > dl_pdu_executors,
span< task_executor * > ul_pdu_executors,
span< task_executor * > ctrl_executors )

Creates an executor mapper for the CU-UP.

91{
92 return std::make_unique<cu_up_executor_mapper_impl>(dl_executors, ul_executors, ctrl_executors);
93}

◆ make_default_drb_mac_lc_config()

mac_lc_config srsran::make_default_drb_mac_lc_config ( )

Generates default DRB MAC Logical Channel configuration for DRBs.

64{
65 mac_lc_config mac_cfg{};
66 // [Implementation-Defined] Setting priority higher than the least priority among SRBs.
67 mac_cfg.priority = 5;
68 mac_cfg.lcg_id = uint_to_lcg_id(2);
69 mac_cfg.pbr = to_prioritized_bit_rate(65537);
70 mac_cfg.bsd = to_bucket_size_duration(5);
71 mac_cfg.lc_sr_mask = false;
72 mac_cfg.lc_sr_delay_applied = false;
73 mac_cfg.sr_id = uint_to_sched_req_id(0);
74 return mac_cfg;
75}

◆ make_default_srb0_rlc_config()

rlc_config srsran::make_default_srb0_rlc_config ( )
inline

SRB0 default configuration (only implementation-specific parameters)

31{
32 rlc_config cfg = {};
33 cfg.mode = rlc_mode::tm;
34 cfg.tm.tx.queue_size = 8;
35 cfg.metrics_period = std::chrono::milliseconds(0); // disable metrics reporting for SRBs
36 return cfg;
37}
Configuration of RLC bearer.
Definition rlc_config.h:763
rlc_tx_tm_config tx
Tx configuration.
Definition rlc_config.h:759
uint32_t queue_size
SDU queue size.
Definition rlc_config.h:751

◆ make_default_srb_mac_lc_config()

mac_lc_config srsran::make_default_srb_mac_lc_config ( lcid_t lcid)

Generates default SRB MAC Logical Channel configuration for SRBs other than SRB0.

50{
51 mac_lc_config mac_cfg{};
52 // See TS 38.331, 9.2.1 Default SRB configurations.
53 mac_cfg.priority = lcid == LCID_SRB2 ? 3 : 1;
54 mac_cfg.lcg_id = uint_to_lcg_id(0);
55 mac_cfg.pbr = to_prioritized_bit_rate(65537);
56 mac_cfg.bsd = to_bucket_size_duration(5);
57 mac_cfg.lc_sr_mask = false;
58 mac_cfg.lc_sr_delay_applied = false;
59 mac_cfg.sr_id = uint_to_sched_req_id(0);
60 return mac_cfg;
61}

◆ make_default_srb_rlc_config()

rlc_config srsran::make_default_srb_rlc_config ( )
inline

SRB1, SRB2 and SRB3 default configuration as per TS 38.331, 9.2.1.

41{
42 rlc_config cfg = {};
43 cfg.mode = rlc_mode::am;
44 cfg.am.tx.sn_field_length = rlc_am_sn_size::size12bits;
45 cfg.am.tx.t_poll_retx = 45;
46 cfg.am.tx.poll_pdu = -1;
47 cfg.am.tx.poll_byte = -1;
48 cfg.am.tx.max_retx_thresh = 8;
49 cfg.am.tx.queue_size = 32;
50 cfg.am.rx.sn_field_length = rlc_am_sn_size::size12bits;
51 cfg.am.rx.t_reassembly = 35;
52 cfg.am.rx.t_status_prohibit = 0;
53 cfg.am.rx.max_sn_per_status = {};
54 cfg.metrics_period = std::chrono::milliseconds(0); // disable metrics reporting for SRBs
55 return cfg;
56}
rlc_tx_am_config tx
Tx configuration.
Definition rlc_config.h:709
rlc_rx_am_config rx
Rx configuration.
Definition rlc_config.h:708
int32_t t_status_prohibit
Timer used by rx to prohibit tx of status PDU (ms)
Definition rlc_config.h:678
optional< uint32_t > max_sn_per_status
Maximum number of visited SNs in the RX window when building a status report.
Definition rlc_config.h:682
rlc_am_sn_size sn_field_length
Number of bits used for sequence number.
Definition rlc_config.h:674
int32_t t_reassembly
Timer used by rx to detect PDU loss (ms)
Definition rlc_config.h:677
int32_t poll_byte
Insert poll bit after this much data (bytes)
Definition rlc_config.h:697
uint32_t max_retx_thresh
Max number of retx.
Definition rlc_config.h:695
uint32_t queue_size
SDU queue size.
Definition rlc_config.h:700
int32_t poll_pdu
Insert poll bit after this many PDUs.
Definition rlc_config.h:696
rlc_am_sn_size sn_field_length
Number of bits used for sequence number.
Definition rlc_config.h:689
int32_t t_poll_retx
Poll retx timeout (ms)
Definition rlc_config.h:692

◆ make_dmrs_info_common() [1/4]

dmrs_information srsran::make_dmrs_info_common ( const pdsch_time_domain_resource_allocation & pdsch_td_cfg,
pci_t pci,
dmrs_typeA_position dmrs_typeA_pos )
inline

Helper factory of a default DM-RS Information object for DCI f1_0 or for when higher layer configuration parameters are not yet available. TODO: generalize to other cases (e.g. mapping type B).

Remarks
See TS 38.214, 5.1.6.2 - DM-RS reception procedure.
59{
60 dmrs_information dmrs{};
61
62 if (pdsch_td_cfg.map_type == sch_mapping_type::typeA) {
63 // Get DM-RS symbols.
64 pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration dmrscfg{};
65 dmrscfg.typeA_pos = dmrs_typeA_pos;
66 dmrscfg.additional_position = dmrs_additional_positions::pos2;
67 dmrscfg.last_symbol = pdsch_td_cfg.symbols.stop();
68 dmrscfg.lte_crs_match_around = false;
69 dmrscfg.ue_capable_additional_dmrs_dl_alt = false;
70 dmrs.dmrs_symb_pos = pdsch_dmrs_symbol_mask_mapping_type_A_single_get(dmrscfg);
71
72 } else {
73 srsran_terminate("Mapping type B not supported");
74 }
75
76 dmrs.config_type = dmrs_config_type::type1;
77 // TODO: See TS 38.211, 7.4.1.1.1.
78 dmrs.dmrs_scrambling_id = pci;
79 dmrs.low_papr_dmrs = false;
80 dmrs.n_scid = false;
81 // See TS 38.214, 5.1.6.2.
82 // When receiving PDSCH scheduled by DCI format 1_0, the UE shall assume the number of DM-RS CDM groups without data
83 // is 1 which corresponds to CDM group 0 for the case of PDSCH with allocation duration of 2 symbols,
84 // and the UE shall assume that the number of DM-RS CDM groups without data is 2 which corresponds to CDM group {0,1}
85 // for all other cases.
86 dmrs.num_dmrs_cdm_grps_no_data = pdsch_td_cfg.symbols.length() == 2 ? 1 : 2;
87 // Port 1000.
88 dmrs.dmrs_ports.resize(12);
89 dmrs.dmrs_ports.set(0);
90
91 return dmrs;
92}
dmrs_symbol_mask pdsch_dmrs_symbol_mask_mapping_type_A_single_get(const pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration &config)
Calculates the DMRS for PDSCH symbol mask for single duration.
Definition pdsch_dmrs_symbol_mask.cpp:27
Definition scheduler_slot_handler.h:75

◆ make_dmrs_info_common() [2/4]

dmrs_information srsran::make_dmrs_info_common ( const pusch_config_common & pusch_cfg,
uint8_t time_resource,
pci_t pci,
dmrs_typeA_position dmrs_typeA_pos )
inline

Helper factory of a default DM-RS Information object for DCI f0_0 or for when higher layer configuration parameters are not yet available. TODO: generalize to other cases (e.g. mapping type B).

Remarks
See TS 38.214 Section 6.2.2.
269{
270 srsran_assert(pusch_cfg.pusch_td_alloc_list.size() > time_resource, "Invalid time resource");
271 const pusch_time_domain_resource_allocation& pusch_time_res = pusch_cfg.pusch_td_alloc_list[time_resource];
272
273 return make_dmrs_info_common(pusch_time_res, pci, dmrs_typeA_pos);
274}
Definition bwp_configuration.h:123

◆ make_dmrs_info_common() [3/4]

dmrs_information srsran::make_dmrs_info_common ( const pusch_time_domain_resource_allocation & pusch_td_cfg,
pci_t pci,
dmrs_typeA_position dmrs_typeA_pos )
inline

Helper factory of a default DM-RS Information object for DCI f0_0 or for when higher layer configuration parameters are not yet available. TODO: generalize to other cases (e.g. mapping type B).

Remarks
See TS 38.214 Section 6.2.2.
171{
172 dmrs_information dmrs{};
173
174 if (pusch_td_cfg.map_type == sch_mapping_type::typeA) {
175 // Get DM-RS symbols.
176 pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration dmrscfg{};
177 dmrscfg.typeA_pos = dmrs_typeA_pos;
178 dmrscfg.additional_position = dmrs_additional_positions::pos2;
179 dmrscfg.last_symbol = pusch_td_cfg.symbols.stop();
180 dmrscfg.lte_crs_match_around = false;
181 dmrscfg.ue_capable_additional_dmrs_dl_alt = false;
182 dmrs.dmrs_symb_pos = pdsch_dmrs_symbol_mask_mapping_type_A_single_get(dmrscfg);
183
184 } else {
185 srsran_terminate("Mapping type B not supported");
186 }
187
188 dmrs.config_type = dmrs_config_type::type1;
189 // TODO: See TS 38.211, 7.4.1.1.1.
190 dmrs.dmrs_scrambling_id = pci;
191 dmrs.low_papr_dmrs = false;
192 dmrs.n_scid = false;
193 // See TS 38.214, 6.2.2.
194 // For PUSCH scheduled by DCI format 0_0 or by activation DCI format 0_0 with CRC scrambled by CS-RNTI, the UE
195 // shall assume the number of DM-RS CDM groups without data is 1 which corresponds to CDM group 0 for the case of
196 // PUSCH with allocation duration of 2 or less OFDM symbols with transform precoding disabled, the UE shall assume
197 // that the number of DM-RS CDM groups without data is 3 which corresponds to CDM group {0,1,2} for the case of
198 // PUSCH scheduled by activation DCI format 0_0 and the dmrs-Type in cg-DMRS-Configuration equal to 'type2' and the
199 // PUSCH allocation duration being more than 2 OFDM symbols, and the UE shall assume that the number of DM-RS
200 // CDM groups without data is 2 which corresponds to CDM group {0,1} for all other cases.
201 dmrs.num_dmrs_cdm_grps_no_data = pusch_td_cfg.symbols.length() <= 2 ? 1 : 2;
202 // Port 1000.
203 dmrs.dmrs_ports.resize(12);
204 dmrs.dmrs_ports.set(0);
205
206 return dmrs;
207}
ofdm_symbol_range symbols
OFDM symbol boundaries for PUSCH. Network configures the fields so it does not cross the slot boundar...
Definition bwp_configuration.h:128

◆ make_dmrs_info_common() [4/4]

dmrs_information srsran::make_dmrs_info_common ( span< const pdsch_time_domain_resource_allocation > pdsch_td_list,
uint8_t time_resource,
pci_t pci,
dmrs_typeA_position dmrs_typeA_pos )
inline

Helper factory of a default DM-RS Information object for DCI f1_0 or for when higher layer configuration parameters are not yet available. TODO: generalize to other cases (e.g. mapping type B).

Remarks
See TS 38.214, 5.1.6.2 - DM-RS reception procedure.
157{
158 srsran_assert(pdsch_td_list.size() > time_resource, "Invalid time resource");
159 const pdsch_time_domain_resource_allocation& pdsch_time_res = pdsch_td_list[time_resource];
160
161 return make_dmrs_info_common(pdsch_time_res, pci, dmrs_typeA_pos);
162}
Definition bwp_configuration.h:97

◆ make_dmrs_info_dedicated() [1/2]

dmrs_information srsran::make_dmrs_info_dedicated ( const pdsch_time_domain_resource_allocation & pdsch_td_cfg,
pci_t pci,
dmrs_typeA_position dmrs_typeA_pos,
const dmrs_downlink_config & dmrs_dl_cfg_ded,
unsigned nof_layers,
unsigned nof_dl_antenna_ports,
bool are_both_cws_enabled )
inline
101{
102 dmrs_information dmrs{};
103
104 // See TS 38.211, 7.4.1.1.2.
105 if (dmrs_dl_cfg_ded.additional_positions == dmrs_additional_positions::pos3 and
106 dmrs_typeA_pos != dmrs_typeA_position::pos2) {
107 srsran_assertion_failure("Invalid PDSCH DMRS configuration. Cause: DMRS Additional Position of pos3 is only "
108 "supported when DMRS TypeA position is equal to pos2.");
109 }
110
111 if (pdsch_td_cfg.map_type == sch_mapping_type::typeA) {
112 // Get DM-RS symbols.
113 pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration dmrscfg{};
114 dmrscfg.typeA_pos = dmrs_typeA_pos;
115 dmrscfg.additional_position = dmrs_dl_cfg_ded.additional_positions;
116 dmrscfg.last_symbol = pdsch_td_cfg.symbols.stop();
117 dmrscfg.lte_crs_match_around = false;
118 dmrscfg.ue_capable_additional_dmrs_dl_alt = false;
119 dmrs.dmrs_symb_pos = pdsch_dmrs_symbol_mask_mapping_type_A_single_get(dmrscfg);
120
121 } else {
122 srsran_terminate("Mapping type B not supported");
123 }
124
125 dmrs.config_type = dmrs_dl_cfg_ded.is_dmrs_type2 ? dmrs_config_type::type2 : dmrs_config_type::type1;
126 // TODO: See TS 38.211, 7.4.1.1.1.
127 dmrs.dmrs_scrambling_id = pci;
128 dmrs.low_papr_dmrs = false;
129 dmrs.n_scid = false;
130 const pdsch_antenna_ports_mapping ant_mapping =
132 nof_dl_antenna_ports,
133 dmrs.config_type,
134 dmrs_dl_cfg_ded.is_max_length_len2 ? dmrs_max_length::len2 : dmrs_max_length::len1,
135 are_both_cws_enabled);
136 // Number of DMRS CDM groups without data indicates whether PDSCH is multiplexed with DMRS or not.
137 // For DMRS configuration type 1:
138 // num_dmrs_cdm_grps_no_data = 1 (multiplexing of DMRS and PDSCH).
139 // num_dmrs_cdm_grps_no_data = 2 (no multiplexing of DMRS and PDSCH).
140 dmrs.num_dmrs_cdm_grps_no_data = ant_mapping.nof_dmrs_cdm_groups_without_data;
141 dmrs.dmrs_ports.resize(12);
142 for (const auto port : ant_mapping.dmrs_ports) {
143 dmrs.dmrs_ports.set(port);
144 }
145
146 return dmrs;
147}
pdsch_antenna_ports_mapping get_pdsch_antenna_port_mapping(unsigned nof_layers, unsigned nof_dl_antenna_ports, dmrs_config_type dmrs_cfg_type, dmrs_max_length dmrs_max_len, bool are_both_cws_enabled)
Returns the PDSCH antenna ports mapping from TS 38.212, tables 7.3.1.2.2-1/2/3/4 based on input confi...
Definition pdsch_antenna_port_mapping.cpp:283
unsigned nof_dmrs_cdm_groups_without_data
Number of DMRS CDM group(s) without data.
Definition pdsch_antenna_ports_mapping.h:33

◆ make_dmrs_info_dedicated() [2/2]

dmrs_information srsran::make_dmrs_info_dedicated ( const pusch_time_domain_resource_allocation & pusch_td_cfg,
pci_t pci,
dmrs_typeA_position dmrs_typeA_pos,
const dmrs_uplink_config & dmrs_ul_cfg,
unsigned nof_layers,
unsigned nof_ul_antenna_ports,
bool are_both_cws_enabled )
inline
216{
217 dmrs_information dmrs{};
218
219 // See TS 38.211, 6.4.1.1.3.
220 if (dmrs_ul_cfg.additional_positions == dmrs_additional_positions::pos3 and
221 dmrs_typeA_pos != dmrs_typeA_position::pos2) {
222 srsran_assertion_failure("Invalid PUSCH DMRS configuration. Cause: DMRS Additional Position of pos3 is only "
223 "supported when DMRS TypeA position is equal to pos2.");
224 }
225
226 if (pusch_td_cfg.map_type == sch_mapping_type::typeA) {
227 // Get DM-RS symbols.
228 pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration dmrscfg{};
229 dmrscfg.typeA_pos = dmrs_typeA_pos;
230 dmrscfg.additional_position = dmrs_ul_cfg.additional_positions;
231 dmrscfg.last_symbol = pusch_td_cfg.symbols.stop();
232 dmrscfg.lte_crs_match_around = false;
233 dmrscfg.ue_capable_additional_dmrs_dl_alt = false;
234 dmrs.dmrs_symb_pos = pdsch_dmrs_symbol_mask_mapping_type_A_single_get(dmrscfg);
235
236 } else {
237 srsran_terminate("Mapping type B not supported");
238 }
239
240 dmrs.config_type = dmrs_ul_cfg.is_dmrs_type2 ? dmrs_config_type::type2 : dmrs_config_type::type1;
241 // TODO: See TS 38.211, 7.4.1.1.1.
242 dmrs.dmrs_scrambling_id = pci;
243 dmrs.low_papr_dmrs = false;
244 dmrs.n_scid = false;
245 // TODO: Derive antenna port mapping based on PUSCH-Config and other DMRS configuration parameters.
246 // Since in our configuration transformPrecoder=disabled, dmrs-Type=1, maxLength=1, rank = 1, we refer to
247 // Table 7.3.1.1.2-8 in TS 38.212.
248 // Number of DMRS CDM groups without data indicates whether PUSCH is multiplexed with DMRS or not.
249 // For DMRS configuration type 1:
250 // num_dmrs_cdm_grps_no_data = 1 (multiplexing of DMRS and PUSCH).
251 // num_dmrs_cdm_grps_no_data = 2 (no multiplexing of DMRS and PUSCH).
252 dmrs.num_dmrs_cdm_grps_no_data = 2;
253 // Port 1000.
254 // Since we are setting num_dmrs_cdm_grps_no_data = 2 it corresponds to row 3 in Table 7.3.1.1.2-8 in TS 38.212.
255 dmrs.dmrs_ports.resize(12);
256 dmrs.dmrs_ports.set(0);
257
258 return dmrs;
259}

◆ make_du()

std::unique_ptr< du > srsran::make_du ( const du_config & du_cfg)

Instantiates a Distributed Unit (DU) object.

29{
30 return std::make_unique<du_impl>(du_cfg);
31}

◆ make_du_high()

std::unique_ptr< du_high > srsran::make_du_high ( const srs_du::du_high_configuration & du_hi_cfg)

Create a DU-high instance, which comprises MAC, RLC and F1 layers.

29{
30 return std::make_unique<srs_du::du_high_impl>(du_hi_cfg);
31}

◆ make_four_layer_four_ports_type1_sp()

precoding_weight_matrix srsran::make_four_layer_four_ports_type1_sp ( unsigned beam_azimuth_id,
unsigned pol_shift_id )

Constructs a precoding weight matrix for three layers mapped into four transmit ports.

All weights are derived from TS38.214 Table 5.2.2.2.1-8, which describes four layer CSI reporting using a Type 1, single panel codebook. For four layers mapped to four antenna ports, the precoding uses a different combination of beam offsets and polarization phase shifts for each layer. The first beam can be selected from eight possible beams, and the polarization phase shift can be selected in $\pi/2$-rad increments, starting from 0 rad. The generated precoding weights for ports 0 and 1 correspond to the antenna elements of the first polarization, while ports 2 and 3 correspond to the antenna elements of the second polarization.

Parameters
[in]beam_azimuth_idFirst beam selector in the horizontal plane. Corresponds to parameter $i_{1,1}$ in TS38.214 Section 5.2.2.2.1. Values: {0, 1, ..., 7}
[in]pol_shift_idPolarization phase shift selector. Corresponds to parameter $i_2$ in TS38.214 Section Section 5.2.2.2.1. Values: {0, 1}
Returns
A precoding weight matrix for four layers and four ports.
407{
408 // Beam oversampling factor in the horizontal plane, from TS38.214 Section 5.2.2.2.1.
409 static constexpr unsigned O_1 = 4;
410 // Number of cross-polarized antenna elements, from TS38.214 Section 5.2.2.2.1.
411 static constexpr unsigned N_1 = 2;
412 // Number of possible horizontal beams to choose from.
413 static constexpr unsigned nof_beams = O_1 * N_1;
414 // Number of possible polarization phase shifts to choose from.
415 static constexpr unsigned nof_pol_shifts = 2;
416
417 static constexpr interval<unsigned, false> beam_azimuth_range(0, nof_beams);
419
420 srsran_assert(beam_azimuth_range.contains(beam_azimuth_id),
421 "The given beam azimuth identifier i1_1 (i.e., {}) is out of the range {}",
424
425 srsran_assert(pol_phase_shift_range.contains(pol_shift_id),
426 "The given polarization phase shift i2 (i.e., {}) is out of the range {}",
429
430 // Precoding weight matrix for three layers mapped into four antenna ports.
431 precoding_weight_matrix result(4, 4);
432
433 // Power normalization factor. It is equal to the square root of the number of ports times the number of layers.
434 static constexpr float scaling = 1.0F / 4.0F;
435
436 // Select k1 as per TS38.214 Section 5.2.2.2.1-4.
437 static constexpr unsigned k1 = O_1;
438
439 // Phase increment for each beam coefficient. This defines the direction of the beam in the horizontal plane.
440 float phase_increment_rad = static_cast<float>(beam_azimuth_id) * 2.0F * M_PI / static_cast<float>(nof_beams);
441 // Polarization phase shift. This defines the relative phase between the cross-polarized antenna elements.
442 float pol_phase_shift_rad = M_PI_2 * static_cast<float>(pol_shift_id);
443
444 std::array<cf_t, N_1> beam;
445
446 // Layer 0.
447
448 // Beam for the first polarization.
449 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
450
451 // Set weights for the first polarization.
452 result.set_coefficient(beam[0], 0, 0);
453 result.set_coefficient(beam[1], 0, 1);
454
455 // Beam for the second polarization.
456 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad, scaling);
457
458 // Set weights for the second polarization.
459 result.set_coefficient(beam[0], 0, 2);
460 result.set_coefficient(beam[1], 0, 3);
461
462 // Layer 2. The phase increment for adjacent beam antenna elements is the same as layer 0.
463
464 // Beam for the first polarization.
465 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
466
467 // Set weights for the first polarization.
468 result.set_coefficient(beam[0], 2, 0);
469 result.set_coefficient(beam[1], 2, 1);
470
471 // Beam for the second polarization.
472 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad + M_PI, scaling);
473
474 // Set weights for the second polarization.
475 result.set_coefficient(beam[0], 2, 2);
476 result.set_coefficient(beam[1], 2, 3);
477
478 // Layer 1. Recalculate phase increment for adjacent beam antenna elements.
479 phase_increment_rad = static_cast<float>(beam_azimuth_id + k1) * 2.0F * M_PI / static_cast<float>(nof_beams);
480
481 // Beam for the first polarization.
482 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
483
484 // Set weights for the first polarization.
485 result.set_coefficient(beam[0], 1, 0);
486 result.set_coefficient(beam[1], 1, 1);
487
488 // Beam for the second polarization.
489 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad, scaling);
490
491 // Set weights for the second polarization.
492 result.set_coefficient(beam[0], 1, 2);
493 result.set_coefficient(beam[1], 1, 3);
494
495 // Layer 3. The phase increment for adjacent beam antenna elements is the same as layer 1.
496
497 // Beam for the first polarization.
498 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
499
500 // Set weights for the first polarization.
501 result.set_coefficient(beam[0], 3, 0);
502 result.set_coefficient(beam[1], 3, 1);
503
504 // Beam for the second polarization.
505 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad + M_PI, scaling);
506
507 // Set weights for the second polarization.
508 result.set_coefficient(beam[0], 3, 2);
509 result.set_coefficient(beam[1], 3, 3);
510
511 return result;
512}
Precoding matrix, consisting of complex coefficients arranged by i) transmit layers and ii) antenna p...
Definition precoding_weight_matrix.h:35

◆ make_gnb_dus()

std::vector< std::unique_ptr< du > > srsran::make_gnb_dus ( const gnb_appconfig & gnb_cfg,
span< du_cell_config > du_cells,
worker_manager & workers,
upper_phy_rg_gateway & rg_gateway,
upper_phy_rx_symbol_request_notifier & rx_symbol_request_notifier,
srs_du::f1c_connection_client & f1c_client_handler,
srs_du::f1u_du_gateway & f1u_gw,
timer_manager & timer_mng,
mac_pcap & mac_p,
rlc_pcap & rlc_p,
gnb_console_helper & console_helper,
e2_connection_client & e2_client_handler,
e2_metric_connector_manager & e2_metric_connectors,
rlc_metrics_notifier & rlc_json_metrics,
metrics_hub & metrics_hub )

Instanties a list of Distributed Unit (DU) given a gNB application configuration.

104{
105 // DU cell config
106 console_helper.set_cells(du_cells);
107
108 // Set up sources for the DU Scheruler UE metrics and add them to metric hub.
109 for (unsigned i = 0; i < gnb_cfg.cells_cfg.size(); i++) {
110 std::string source_name = "DU " + std::to_string(i);
111 auto source = std::make_unique<scheduler_ue_metrics_source>(source_name);
112 metrics_hub.add_source(std::move(source));
113
114 // Get DU Scheduler UE metrics source pointer.
116 if (sched_source == nullptr) {
117 continue;
118 }
119
120 // Connect Console Aggregator to DU Scheduler UE metrics.
121 sched_source->add_subscriber(console_helper.get_stdout_metrics_notifier());
122
123 // Connect JSON metrics reporter to DU Scheduler UE metrics.
124 if (gnb_cfg.metrics_cfg.enable_json_metrics) {
125 sched_source->add_subscriber(console_helper.get_json_metrics_notifier());
126 }
127
128 // Connect E2 agent to DU Scheduler UE metrics.
129 if (gnb_cfg.e2_cfg.enable_du_e2) {
130 sched_source->add_subscriber(e2_metric_connectors.get_e2_du_metric_notifier(i));
131 }
132 }
133
134 std::vector<std::unique_ptr<du>> du_insts;
135 for (unsigned i = 0, e = du_cells.size(); i != e; ++i) {
136 // Create a gNB config with one cell.
138 tmp_cfg.cells_cfg.resize(1);
139 tmp_cfg.cells_cfg[0] = gnb_cfg.cells_cfg[i];
140
141 du_config du_cfg = {};
142 std::vector<task_executor*> du_low_dl_exec;
143 workers.get_du_low_dl_executors(du_low_dl_exec, i);
144
145 // DU-low configuration.
146 du_cfg.du_lo = create_du_low_config(tmp_cfg,
147 &rg_gateway,
149 workers.upper_pucch_exec[i],
150 workers.upper_pusch_exec[i],
151 workers.upper_pusch_decoder_exec[i],
152 workers.upper_prach_exec[i],
153 workers.upper_pdsch_exec[i],
154 &rx_symbol_request_notifier);
155 // DU-high configuration.
157 du_hi_cfg.exec_mapper = &workers.get_du_high_executor_mapper(i);
158 du_hi_cfg.f1c_client = &f1c_client_handler;
159 du_hi_cfg.f1u_gw = &f1u_gw;
160 du_hi_cfg.phy_adapter = nullptr;
161 du_hi_cfg.timers = &timer_mng;
162 du_hi_cfg.cells = {du_cells[i]};
165 du_hi_cfg.mac_p = &mac_p;
166 du_hi_cfg.rlc_p = &rlc_p;
167 du_hi_cfg.gnb_du_id = du_insts.size() + 1;
168 du_hi_cfg.gnb_du_name = fmt::format("srsdu{}", du_hi_cfg.gnb_du_id);
169 du_hi_cfg.du_bind_addr = {fmt::format("127.0.0.{}", du_hi_cfg.gnb_du_id)};
171 du_hi_cfg.sched_ue_metrics_notifier = metrics_hub.get_scheduler_ue_metrics_source("DU " + std::to_string(i));
173
174 // Connect RLC metrics to sinks, if required
175 if (gnb_cfg.metrics_cfg.rlc.json_enabled || gnb_cfg.e2_cfg.enable_du_e2) {
176 // This source aggregates the RLC metrics from all DRBs in a single DU.
177 std::string source_name = "rlc_metric_aggr_du_" + std::to_string(i);
178 auto rlc_source = std::make_unique<rlc_metrics_source>(source_name);
179
180 if (gnb_cfg.metrics_cfg.rlc.json_enabled) {
181 // Connect JSON metrics plotter to RLC metric source.
182 rlc_source->add_subscriber(rlc_json_metrics);
183 }
184 if (gnb_cfg.e2_cfg.enable_du_e2) {
185 // Connect E2 agent to RLC metric source.
186 du_hi_cfg.e2_client = &e2_client_handler;
187 du_hi_cfg.e2ap_config = generate_e2_config(gnb_cfg);
188 du_hi_cfg.e2_du_metric_iface = &(e2_metric_connectors.get_e2_du_metrics_interface(i));
189 rlc_source->add_subscriber(e2_metric_connectors.get_e2_du_metric_notifier(i));
190 }
191 // Pass RLC metric source to the DU high.
193 du_hi_cfg.rlc_metrics_notif = metrics_hub.get_rlc_metrics_source(source_name);
194 }
195
196 // Configure test mode
197 if (gnb_cfg.test_mode_cfg.test_ue.rnti != rnti_t::INVALID_RNTI) {
198 du_hi_cfg.test_cfg.test_ue =
199 srs_du::du_test_config::test_ue_config{gnb_cfg.test_mode_cfg.test_ue.rnti,
200 gnb_cfg.test_mode_cfg.test_ue.nof_ues,
201 gnb_cfg.test_mode_cfg.test_ue.auto_ack_indication_delay,
202 gnb_cfg.test_mode_cfg.test_ue.pdsch_active,
203 gnb_cfg.test_mode_cfg.test_ue.pusch_active,
204 gnb_cfg.test_mode_cfg.test_ue.cqi,
205 gnb_cfg.test_mode_cfg.test_ue.ri,
206 gnb_cfg.test_mode_cfg.test_ue.pmi,
207 gnb_cfg.test_mode_cfg.test_ue.i_1_1,
208 gnb_cfg.test_mode_cfg.test_ue.i_1_3,
209 gnb_cfg.test_mode_cfg.test_ue.i_2};
210 }
211 // FAPI configuration.
212 du_cfg.fapi.log_level = gnb_cfg.log_cfg.fapi_level;
213 du_cfg.fapi.sector = i;
214 du_cfg.fapi.prach_ports = tmp_cfg.cells_cfg.front().cell.prach_cfg.ports;
215
216 du_insts.push_back(make_du(du_cfg));
217 report_error_if_not(du_insts.back(), "Invalid Distributed Unit");
218 }
219
220 return du_insts;
221}
Definition metrics_hub.h:70
rlc_metrics_source * get_rlc_metrics_source(std::string source_name_)
retrieves a pointer to the RLC metric source with the given name.
Definition metrics_hub.cpp:48
scheduler_ue_metrics_source * get_scheduler_ue_metrics_source(std::string source_name_)
retrieves a pointer to the Scheduler UE metric source with the given name.
Definition metrics_hub.cpp:38
void add_source(std::unique_ptr< metrics_hub_source > source)
moves the new source object to the metrics hub.
Definition metrics_hub.cpp:32
Definition metrics_hub.h:46
scheduler_expert_config generate_scheduler_expert_config(const gnb_appconfig &config)
Converts and returns the given gnb application configuration to a scheduler expert configuration.
Definition gnb_appconfig_translators.cpp:1699
e2ap_configuration generate_e2_config(const gnb_appconfig &config)
Converts and returns the given gnb application configuration to a E2 configuration.
Definition gnb_appconfig_translators.cpp:1784
std::map< srb_id_t, du_srb_config > generate_du_srb_config(const gnb_appconfig &config)
Converts and returns the given gnb application QoS configuration to a DU SRB list configuration.
Definition gnb_appconfig_translators.cpp:1159
std::unique_ptr< du > make_du(const du_config &du_cfg)
Instantiates a Distributed Unit (DU) object.
Definition du_factory.cpp:28
mac_expert_config generate_mac_expert_config(const gnb_appconfig &config)
Converts and returns the given gnb application configuration to a mac expert configuration.
Definition gnb_appconfig_translators.cpp:1688
Definition du_config.h:36
Configuration passed to DU-High.
Definition du_high_configuration.h:32

◆ make_id_comparator()

template<typename GetId >
obj_id_comparator< GetId > srsran::make_id_comparator ( GetId && g)
65{
66 return {std::forward<GetId>(g)};
67}

◆ make_identity()

precoding_weight_matrix srsran::make_identity ( unsigned nof_streams)

Constructs a precoding weight matrix for the one layer–one port mapping.

The precoding maps each layer to the port with the same identifier.

Parameters
[in]nof_streamsNumber of layers and ports.
Returns
A scaled identity precoding weight matrix for nof_streams layers and ports. The constant value of the entries in the main diagonal is computed to satisfy power-allocation requirements. All other entries are equal to zero.
Remarks
An assertion is triggered if nof_streams is out of the range {1, ..., precoding_constants::MAX_NOF_LAYERS}.
72{
73 static constexpr interval<unsigned, true> nof_streams_range(1, precoding_constants::MAX_NOF_LAYERS);
74
75 srsran_assert(nof_streams_range.contains(nof_streams),
76 "The number of streams (i.e., {}) is out of the valid range {}.",
79
81
82 cf_t normalised_weight = 1.0F / std::sqrt(static_cast<float>(nof_streams));
83
84 // Set weights per port.
85 for (unsigned i_layer = 0; i_layer != nof_streams; ++i_layer) {
86 for (unsigned i_port = 0; i_port != nof_streams; ++i_port) {
88 result.set_coefficient(weight, i_layer, i_port);
89 }
90 }
91 return result;
92}

◆ make_mac_cell_config()

mac_cell_creation_request srsran::make_mac_cell_config ( du_cell_index_t cell_index,
const du_cell_config & du_cfg,
std::vector< byte_buffer > bcch_dl_sch_payloads,
const sched_cell_configuration_request_message & sched_cell_cfg )

Derives MAC Cell Configuration from DU Cell Configuration.

33{
35 mac_cfg.cell_index = cell_index;
36 mac_cfg.pci = du_cfg.pci;
37 mac_cfg.scs_common = du_cfg.scs_common;
38 mac_cfg.ssb_cfg = du_cfg.ssb_cfg;
39 mac_cfg.dl_carrier = du_cfg.dl_carrier;
40 mac_cfg.ul_carrier = du_cfg.ul_carrier;
41 mac_cfg.cell_barred = du_cfg.cell_barred;
42 mac_cfg.intra_freq_resel = du_cfg.intra_freq_resel;
43 mac_cfg.bcch_dl_sch_payloads = std::move(bcch_dl_sch_payloads);
44 mac_cfg.sched_req = sched_cell_cfg;
45
46 return mac_cfg;
47}
Definition cell_configuration.h:47

◆ make_one_layer_all_ports()

precoding_weight_matrix srsran::make_one_layer_all_ports ( unsigned nof_ports)

Constructs a precoding weight matrix for one layer mapped into all transmit ports.

All weights are set so that an identical signal is generated for each antenna port.

Parameters
[in]nof_portsNumber of ports available for transmitting.
Returns
A precoding weight matrix (actually, a column vector) for one layer and nof_ports.
Remarks
This precoding matrix is intended for testing purposes only.
53{
54 interval<unsigned, true> nof_ports_range(1, precoding_constants::MAX_NOF_PORTS);
55 srsran_assert(nof_ports_range.contains(nof_ports),
56 "The number of ports (i.e., {}) is out of the valid range {}.",
57 nof_ports,
59
60 precoding_weight_matrix result(1, nof_ports);
61
62 // Set normalized weights per port.
63 cf_t weight = {1.0F / std::sqrt(static_cast<float>(nof_ports)), 0.0F};
64 for (unsigned i_port = 0; i_port != nof_ports; ++i_port) {
65 result.set_coefficient(weight, 0, i_port);
66 }
67
68 return result;
69}

◆ make_one_layer_four_ports_type1_sp_mode1()

precoding_weight_matrix srsran::make_one_layer_four_ports_type1_sp_mode1 ( unsigned beam_azimuth_id,
unsigned pol_shift_id )

Constructs a precoding weight matrix for one layer mapped into four transmit ports.

All weights are derived from TS38.214 Table 5.2.2.2.1-5, which describes one layer CSI reporting using a Type 1, single panel codebook. For one layer mapped to four antenna ports, the precoding uses the same beam for both antenna polarizations. The beam can be selected from eight possible beams, and the phase shift between cross-polarized antenna elements can be selected in $\pi/2$-rad increments, starting from 0 rad. The generated precoding weights for ports 0 and 1 correspond to the antenna elements of the first polarization, while ports 2 and 3 correspond to the antenna elements of the second polarization.

Parameters
[in]beam_azimuth_idBeam selector in the horizontal plane. Corresponds to parameter $i_{1,1}$ in TS38.214 Section 5.2.2.2.1. Values: {0, 1, ..., 7}
[in]pol_shift_idPolarization phase shift selector. Corresponds to parameter $i_2$ in TS38.214 Section 5.2.2.2.1. Values: {0, 1, ..., 3}
Returns
A precoding weight matrix for one layer and four ports.
177{
178 // Beam oversampling factor in the horizontal plane, from TS38.214 Section 5.2.2.2.1.
179 static constexpr unsigned O_1 = 4;
180 // Number of cross-polarized antenna elements, from TS38.214 Section 5.2.2.2.1.
181 static constexpr unsigned N_1 = 2;
182 // Number of possible horizontal beams to choose from.
183 static constexpr unsigned nof_beams = O_1 * N_1;
184 // Number of possible polarization phase shifts to choose from.
185 static constexpr unsigned nof_pol_shifts = 4;
186
187 static constexpr interval<unsigned, false> beam_azimuth_range(0, nof_beams);
189
190 srsran_assert(beam_azimuth_range.contains(beam_azimuth_id),
191 "The given beam azimuth identifier i1_1 (i.e., {}) is out of the range {}",
194
195 srsran_assert(pol_phase_shift_range.contains(pol_shift_id),
196 "The given polarization phase shift i2 (i.e., {}) is out of the range {}",
199
200 // Precoding weight matrix for one layer mapped into four antenna ports.
201 precoding_weight_matrix result(1, 4);
202
203 // Power normalization factor. It is equal to the square root of the number of antenna ports.
204 static constexpr float scaling = 0.5F;
205
206 // Phase increment for each beam coefficient. This defines the direction of the beam in the horizontal plane.
207 float phase_increment_rad = 2.0F * M_PI * static_cast<float>(beam_azimuth_id) / static_cast<float>(nof_beams);
208 // Polarization phase shift. This defines the relative phase between the cross-polarized antenna elements.
209 float pol_phase_shift_rad = M_PI_2 * static_cast<float>(pol_shift_id);
210
211 std::array<cf_t, N_1> beam;
212
213 // Beam for the first polarization.
214 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
215
216 // Set weights for the first polarization.
217 result.set_coefficient(beam[0], 0, 0);
218 result.set_coefficient(beam[1], 0, 1);
219
220 // Beam for the second polarization.
221 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad, scaling);
222
223 // Set weights for the second polarization.
224 result.set_coefficient(beam[0], 0, 2);
225 result.set_coefficient(beam[1], 0, 3);
226
227 return result;
228}

◆ make_one_layer_one_port()

precoding_weight_matrix srsran::make_one_layer_one_port ( unsigned nof_ports,
unsigned i_port )

Constructs a precoding weight matrix for one layer mapped into one transmit port.

The matrix dimensions correspond to one layer and a given number of ports. All weights are zero except for the indicated port.

Parameters
[in]nof_portsNumber of ports available for transmitting.
[in]i_portPort identifier {0, ..., nof_ports - 1}.
Returns
A precoding weight matrix for one layer and nof_ports ports.
Remarks
An assertion is triggered if i_port is equal to or greater than nof_ports.
34{
36 srsran_assert(selected_i_port_range.contains(selected_i_port),
37 "The given port identifier (i.e., {}) is out of the valid range {}",
40
41 precoding_weight_matrix result(1, nof_ports);
42
43 // Set weights per port.
44 for (unsigned i_port = 0; i_port != nof_ports; ++i_port) {
45 cf_t port_weight = (i_port == selected_i_port) ? 1.0F : 0.0F;
46 result.set_coefficient(port_weight, 0, i_port);
47 }
48
49 return result;
50}

◆ make_one_layer_two_ports()

precoding_weight_matrix srsran::make_one_layer_two_ports ( unsigned i_codebook)

Constructs a precoding weight matrix for one layer mapped into two transmit ports.

All weights are derived from TS38.214 Table 5.2.2.2.1-1 for 1-layer CSI reporting.

Parameters
[in]i_codebookCodebook identifier.
Returns
A precoding weight matrix for one layer and two ports.
95{
96 static constexpr interval<unsigned, true> i_codebook_range(0, 3);
97 static constexpr cf_t sqrt_1_2 = {M_SQRT1_2, 0};
98 static constexpr cf_t j_sqrt_1_2 = {0, M_SQRT1_2};
99 static constexpr cf_t minus_sqrt_1_2 = {-M_SQRT1_2, 0};
100 static constexpr cf_t minus_j_sqrt_1_2 = {0, -M_SQRT1_2};
101 static constexpr std::array<std::array<cf_t, 2>, 4> codebooks = {
103
104 srsran_assert(i_codebook_range.contains(i_codebook),
105 "The given codebook identifier (i.e., {}) is out of the range {}",
108
109 precoding_weight_matrix result(1, 2);
110
111 // Select codebook.
113
114 // Set weights per port.
115 for (unsigned i_port = 0; i_port != 2; ++i_port) {
116 result.set_coefficient(codebook[i_port], 0, i_port);
117 }
118
119 return result;
120}

◆ make_pdcp_drb_config()

pdcp_config srsran::make_pdcp_drb_config ( const e1ap_pdcp_config & e1ap_cfg,
const security_indication_t & security_ind )
inline
32{
33 pdcp_config cfg = {};
34
36 // Fill TX/RX common config //
38 // RB type
39 cfg.rb_type = pdcp_rb_type::drb;
40
41 // RLC mode
42 cfg.rlc_mode = e1ap_cfg.rlc_mod;
43
44 // Integrity protection required
45 cfg.integrity_protection_required =
46 security_ind.integrity_protection_ind != integrity_protection_indication_t::not_needed;
47
48 // Ciphering required
49 cfg.ciphering_required =
50 security_ind.confidentiality_protection_ind != confidentiality_protection_indication_t::not_needed;
51
52 // SN size
53 cfg.tx.sn_size = e1ap_cfg.pdcp_sn_size_dl; // TODO check UL or DL from the UE or gNB perspective.
54 cfg.rx.sn_size = e1ap_cfg.pdcp_sn_size_ul;
55
56 // Direction
57 cfg.tx.direction = pdcp_security_direction::downlink;
58 cfg.rx.direction = pdcp_security_direction::uplink;
59
60 // TX config
61 // Discard timer
62 cfg.tx.discard_timer = e1ap_cfg.discard_timer;
63
64 // Status report required
65 // FIXME update ASN1 to include status report required, as included in 38.463, v16.3
66 cfg.tx.status_report_required = false;
67
68 // RX configuration
69 // Out-of-order delivery
70 if (e1ap_cfg.out_of_order_delivery.has_value()) {
71 cfg.rx.out_of_order_delivery = true;
72 }
73
74 // t-Reordering
75 if (e1ap_cfg.t_reordering_timer.has_value()) {
76 cfg.rx.t_reordering = e1ap_cfg.t_reordering_timer.value();
77 } else {
78 cfg.rx.t_reordering = pdcp_t_reordering::infinity;
79 }
80
81 return cfg;
82}

◆ make_priority_task_executor_ptr() [1/2]

template<task_priority Priority, concurrent_queue_policy... QueuePolicies>
std::unique_ptr< task_executor > srsran::make_priority_task_executor_ptr ( priority_task_worker< QueuePolicies... > & worker)

Create general task executor pointer with Priority for priority_multiqueue_task_worker.

169{
170 return std::make_unique<priority_task_worker_executor<get_priority_queue_policy<QueuePolicies...>(Priority)>>(
171 worker.template get_enqueuer<Priority>(), Priority, worker.get_id(), worker.worker_name());
172}
Task executor with Priority (lower is higher) for priority_task_worker.
Definition priority_task_worker.h:125
std::thread::id get_id() const
Get worker thread id.
Definition priority_task_worker.h:88
const char * worker_name() const
Get worker thread name.
Definition priority_task_worker.h:91
constexpr concurrent_queue_policy get_priority_queue_policy(enqueue_priority Priority)
Gets the queue policy for a given priority.
Definition concurrent_queue.h:842

◆ make_priority_task_executor_ptr() [2/2]

template<concurrent_queue_policy... QueuePolicies>
std::unique_ptr< task_executor > srsran::make_priority_task_executor_ptr ( priority_task_worker< QueuePolicies... > & worker,
task_priority priority )

Create general task executor pointer with Priority for priority_multiqueue_task_worker.

205{
206 std::unique_ptr<task_executor> exec;
207 detail::visit_executor(
208 worker,
209 priority,
210 [&exec](const auto& e) { exec = std::make_unique<decltype(e)>(e); },
211 std::make_index_sequence<sizeof...(QueuePolicies)>{});
212 return exec;
213}

◆ make_priority_task_worker_executor()

template<task_priority Priority, concurrent_queue_policy... QueuePolicies>
auto srsran::make_priority_task_worker_executor ( priority_task_worker< QueuePolicies... > & worker)

Create task executor with Priority for priority_multiqueue_task_worker.

161{
162 return priority_task_worker_executor<get_priority_queue_policy<QueuePolicies...>(Priority)>(
163 worker.template get_enqueuer<Priority>(), Priority, worker.get_id(), worker.worker_name());
164}

◆ make_priority_task_worker_pool_executor()

template<enqueue_priority Priority, concurrent_queue_policy... QueuePolicies>
auto srsran::make_priority_task_worker_pool_executor ( task_worker_pool< QueuePolicies... > & worker)

Create task executor with Priority for task_worker_pool that supports multiple priorities.

267{
268 return priority_task_worker_pool_executor<get_priority_queue_policy<QueuePolicies...>(Priority)>(
269 worker.template get_enqueuer<Priority>(), Priority, worker);
270}
Task executor that pushes tasks to worker pool with a given priority.
Definition task_worker_pool.h:233

◆ make_priority_task_worker_pool_executor_ptr()

template<enqueue_priority Priority, concurrent_queue_policy... QueuePolicies>
std::unique_ptr< task_executor > srsran::make_priority_task_worker_pool_executor_ptr ( task_worker_pool< QueuePolicies... > & worker)

Create general task executor pointer with Priority for task_worker_pool that supports multiple priorities.

276{
277 return std::make_unique<priority_task_worker_pool_executor<get_priority_queue_policy<QueuePolicies...>(Priority)>>(
278 worker.template get_enqueuer<Priority>(), Priority, worker.name());
279}
const char * name() const
Name given to the pool.
Definition task_worker_pool.h:48

◆ make_scope_exit()

template<typename Callable >
detail::scope_exit< std::decay_t< Callable > > srsran::make_scope_exit ( Callable && callable)

Defers callable call to scope exit.

Template Parameters
CallableAny type with a call operator
Parameters
callablefunction that is called at scope exit
Returns
object that has to be stored in a local variable
67{
68 return detail::scope_exit<std::decay_t<Callable>>{std::forward<Callable>(callable)};
69}
Definition scope_exit.h:33

◆ make_sdap_drb_config()

sdap_config srsran::make_sdap_drb_config ( const sdap_config_t & e1ap_cfg)
inline
85{
86 sdap_config cfg = {};
87 cfg.default_drb = e1ap_cfg.default_drb;
88 cfg.header_ul = e1ap_cfg.sdap_hdr_ul;
89 cfg.header_dl = e1ap_cfg.sdap_hdr_dl;
90 return cfg;
91}
Configurable parameters for SDAP mapping.
Definition sdap_config.h:39

◆ make_single_port()

precoding_weight_matrix srsran::make_single_port ( )

Constructs a precoder configuration for a single transmitter port.

29{
30 return make_one_layer_one_port(1, 0);
31}
precoding_weight_matrix make_one_layer_one_port(unsigned nof_ports, unsigned i_port)
Constructs a precoding weight matrix for one layer mapped into one transmit port.
Definition precoding_codebooks.cpp:33

◆ make_strand_executor_ptr()

template<concurrent_queue_policy QueuePolicy, typename OutExec >
std::unique_ptr< task_executor > srsran::make_strand_executor_ptr ( OutExec && out_exec,
unsigned queue_size )

Make a strand executor that manages the lifetime of a strand with a single queue.

358{
359 auto strand = make_task_strand_ptr<QueuePolicy, OutExec>(std::forward<OutExec>(out_exec), queue_size);
360 auto enqueuer = strand->template get_enqueuer<enqueue_priority::max>();
361
362 return std::make_unique<shared_strand_executor<QueuePolicy>>(enqueuer, std::move(strand));
363}

◆ make_strand_executor_ptrs() [1/2]

template<typename OutExec >
std::vector< std::unique_ptr< task_executor > > srsran::make_strand_executor_ptrs ( OutExec && out_exec,
span< const concurrent_queue_params > strand_queues )

Creates a list of task executors associated with a strand that points to the provided out executor.

453{
454 return detail::make_strand_executors_iter_helper<OutExec>(std::forward<OutExec>(out_exec), strand_queues);
455}

◆ make_strand_executor_ptrs() [2/2]

template<concurrent_queue_policy... QueuePolicies, typename OutExec >
std::vector< std::unique_ptr< task_executor > > srsran::make_strand_executor_ptrs ( OutExec && out_exec,
span< const unsigned > qsizes )

Create all executors associated with a given strand. The executors will manage the strand lifetime via reference counting.

391{
392 std::shared_ptr<task_strand<OutExec, QueuePolicies...>> strand_shared =
393 make_task_strand_ptr<QueuePolicies...>(std::forward<OutExec>(out_exec), qsizes);
394
395 return detail::make_strand_executor_ptrs_helper(strand_shared, std::make_index_sequence<sizeof...(QueuePolicies)>{});
396}
This class implements a strand of one or more enqueueing policies, each with a different priority.
Definition strand_executor.h:293
std::unique_ptr< task_strand< OutExec, QueuePolicy > > make_task_strand_ptr(OutExec &&out_exec, unsigned strand_queue_size)
Creates a task strand instance given a list of parameters.
Definition strand_executor.h:336

◆ make_sync_executor()

template<typename Executor >
std::unique_ptr< task_executor > srsran::make_sync_executor ( Executor && executor)
97{
98 return std::make_unique<sync_task_executor<Executor>>(std::forward<Executor>(executor));
99}

◆ make_task_executor()

168{
170}
Executor for single-thread task worker.
Definition task_worker.h:138

◆ make_task_executor_ptr()

template<concurrent_queue_policy QueuePolicy, concurrent_queue_wait_policy WaitPolicy>
std::unique_ptr< task_executor > srsran::make_task_executor_ptr ( general_task_worker< QueuePolicy, WaitPolicy > & w)
inline
174{
175 return std::make_unique<general_task_worker_executor<QueuePolicy, WaitPolicy>>(w);
176}

◆ make_task_strand_ptr() [1/2]

template<concurrent_queue_policy... QueuePolicies, typename OutExec >
std::unique_ptr< task_strand< OutExec, QueuePolicies... > > srsran::make_task_strand_ptr ( OutExec && out_exec,
span< const unsigned > strand_queue_sizes )
343{
344 report_error_if_not(strand_queue_sizes.size() == sizeof...(QueuePolicies),
345 "Number of queue sizes must match number of policies ({}!={})",
346 strand_queue_sizes.size(),
347 sizeof...(QueuePolicies));
348 return std::make_unique<task_strand<OutExec, QueuePolicies...>>(std::forward<OutExec>(out_exec), strand_queue_sizes);
349}

◆ make_task_strand_ptr() [2/2]

template<concurrent_queue_policy QueuePolicy, typename OutExec >
std::unique_ptr< task_strand< OutExec, QueuePolicy > > srsran::make_task_strand_ptr ( OutExec && out_exec,
unsigned strand_queue_size )

Creates a task strand instance given a list of parameters.

337{
338 return std::make_unique<task_strand<OutExec, QueuePolicy>>(std::forward<OutExec>(out_exec), strand_queue_size);
339}

◆ make_three_layer_four_ports_type1_sp()

precoding_weight_matrix srsran::make_three_layer_four_ports_type1_sp ( unsigned beam_azimuth_id,
unsigned pol_shift_id )

Constructs a precoding weight matrix for three layers mapped into four transmit ports.

All weights are derived from TS38.214 Table 5.2.2.2.1-7, which describes three layer CSI reporting using a Type 1, single panel codebook. For three layers mapped to four antenna ports, the precoding uses a different combination of beam offsets and polarization phase shifts for each layer. The first beam can be selected from eight possible beams, and the phase shift between cross-polarized antenna elements can be selected in $\pi/2$-rad increments, starting from 0 rad. The generated precoding weights for ports 0 and 1 correspond to the antenna elements of the first polarization, while ports 2 and 3 correspond to the antenna elements of the second polarization.

Parameters
[in]beam_azimuth_idFirst beam selector in the horizontal plane. Corresponds to parameter $i_{1,1}$ in TS38.214 Section 5.2.2.2.1. Values: {0, 1, ..., 7}
[in]pol_shift_idPolarization phase shift selector. Corresponds to parameter $i_2$ in TS38.214 Section Section 5.2.2.2.1. Values: {0, 1}
Returns
A precoding weight matrix for three layers and four ports.
315{
316 // Beam oversampling factor in the horizontal plane, from TS38.214 Section 5.2.2.2.1.
317 static constexpr unsigned O_1 = 4;
318 // Number of cross-polarized antenna elements, from TS38.214 Section 5.2.2.2.1.
319 static constexpr unsigned N_1 = 2;
320 // Number of possible horizontal beams to choose from.
321 static constexpr unsigned nof_beams = O_1 * N_1;
322 // Number of possible polarization phase shifts to choose from.
323 static constexpr unsigned nof_pol_shifts = 2;
324
325 static constexpr interval<unsigned, false> beam_azimuth_range(0, nof_beams);
327
328 srsran_assert(beam_azimuth_range.contains(beam_azimuth_id),
329 "The given beam azimuth identifier i1_1 (i.e., {}) is out of the range {}",
332
333 srsran_assert(pol_phase_shift_range.contains(pol_shift_id),
334 "The given polarization phase shift i2 (i.e., {}) is out of the range {}",
337
338 // Precoding weight matrix for three layers mapped into four antenna ports.
339 precoding_weight_matrix result(3, 4);
340
341 // Power normalization factor. It is equal to the square root of the number of ports times the number of layers.
342 float scaling = 1.0F / std::sqrt(12.0F);
343
344 // Select k1 as per TS38.214 Section 5.2.2.2.1-4.
345 static constexpr unsigned k1 = O_1;
346
347 // Phase increment for each beam coefficient. This defines the direction of the beam in the horizontal plane.
348 float phase_increment_rad = static_cast<float>(beam_azimuth_id) * 2.0F * M_PI / static_cast<float>(nof_beams);
349 // Polarization phase shift. This defines the relative phase between the cross-polarized antenna elements.
350 float pol_phase_shift_rad = M_PI_2 * static_cast<float>(pol_shift_id);
351
352 std::array<cf_t, N_1> beam;
353
354 // Layer 0.
355
356 // Beam for the first polarization.
357 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
358
359 // Set weights for the first polarization.
360 result.set_coefficient(beam[0], 0, 0);
361 result.set_coefficient(beam[1], 0, 1);
362
363 // Beam for the second polarization.
364 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad, scaling);
365
366 // Set weights for the second polarization.
367 result.set_coefficient(beam[0], 0, 2);
368 result.set_coefficient(beam[1], 0, 3);
369
370 // Layer 2. The phase increment for adjacent beam antenna elements is the same as layer 0.
371
372 // Beam for the first polarization.
373 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
374
375 // Set weights for the first polarization.
376 result.set_coefficient(beam[0], 2, 0);
377 result.set_coefficient(beam[1], 2, 1);
378
379 // Beam for the second polarization.
380 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad + M_PI, scaling);
381
382 // Set weights for the second polarization.
383 result.set_coefficient(beam[0], 2, 2);
384 result.set_coefficient(beam[1], 2, 3);
385
386 // Layer 1. Recalculate phase increment for adjacent beam antenna elements.
387 phase_increment_rad = static_cast<float>(beam_azimuth_id + k1) * 2.0F * M_PI / static_cast<float>(nof_beams);
388
389 // Beam for the first polarization.
390 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
391
392 // Set weights for the first polarization.
393 result.set_coefficient(beam[0], 1, 0);
394 result.set_coefficient(beam[1], 1, 1);
395
396 // Beam for the second polarization.
397 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad, scaling);
398
399 // Set weights for the second polarization.
400 result.set_coefficient(beam[0], 1, 2);
401 result.set_coefficient(beam[1], 1, 3);
402
403 return result;
404}

◆ make_trace_executor()

template<typename Exec , typename Tracer >
executor_tracer< Exec, Tracer > srsran::make_trace_executor ( const std::string & name,
Exec && exec,
Tracer & tracer )
126{
127 return executor_tracer<Exec, Tracer>(std::forward<Exec>(exec), tracer, name);
128}
A task executor that traces the latencies of the task enqueuing/dequeuing and task invocation.
Definition executor_tracer.h:33

◆ make_trace_executor_ptr()

template<typename Exec , typename Tracer >
std::unique_ptr< task_executor > srsran::make_trace_executor_ptr ( const std::string & name,
Exec && exec,
Tracer & tracer )
132{
133 return std::make_unique<executor_tracer<Exec, Tracer>>(std::forward<Exec>(exec), tracer, name);
134}

◆ make_two_layer_four_ports_type1_sp_mode1()

precoding_weight_matrix srsran::make_two_layer_four_ports_type1_sp_mode1 ( unsigned beam_azimuth_id,
unsigned beam_offset_id,
unsigned pol_shift_id )

Constructs a precoding weight matrix for two layers mapped into four transmit ports.

All weights are derived from TS38.214 Table 5.2.2.2.1-6, which describes two layer CSI reporting using a Type 1, single panel codebook. For two layers mapped to four antenna ports, the precoding uses one beam for each layer. The first beam can be selected from eight possible beams, and the second beam is specified by applying an offset to the direction of the first one, in $\pi$-rad increments, starting from 0 rad. The phase shift between cross-polarized antenna elements can be selected in $\pi/2$-rad increments, starting from 0 rad. The generated precoding weights for ports 0 and 1 correspond to the antenna elements of the first polarization, while ports 2 and 3 correspond to the antenna elements of the second polarization.

Parameters
[in]beam_azimuth_idFirst beam selector in the horizontal plane. Corresponds to parameter $i_{1,1}$ in TS38.214 Section 5.2.2.2.1. Values: {0, 1, ..., 7}
[in]beam_offset_idSecond beam offset selector. Corresponds to parameter $i_{1,3}$ in TS38.214 Section 5.2.2.2.1. Values: {0, 1}
[in]pol_shift_idPolarization phase shift selector. Corresponds to parameter $i_2$ in TS38.214 Section Section 5.2.2.2.1. Values: {0, 1}
Returns
A precoding weight matrix for two layers and four ports.
233{
234 // Beam oversampling factor in the horizontal plane, from TS38.214 Section 5.2.2.2.1.
235 static constexpr unsigned O_1 = 4;
236 // Number of cross-polarized antenna elements, from TS38.214 Section 5.2.2.2.1.
237 static constexpr unsigned N_1 = 2;
238 // Number of possible horizontal beams to choose from.
239 static constexpr unsigned nof_beams = O_1 * N_1;
240 // Number of possible polarization phase shifts to choose from.
241 static constexpr unsigned nof_pol_shifts = 2;
242
243 static constexpr interval<unsigned, false> beam_azimuth_range(0, nof_beams);
244 static constexpr interval<unsigned, false> beam_offset_range(0, 2);
246
247 srsran_assert(beam_azimuth_range.contains(beam_azimuth_id),
248 "The given beam azimuth identifier i1_1 (i.e., {}) is out of the range {}",
251
252 srsran_assert(beam_offset_range.contains(beam_offset_id),
253 "The given beam offset identifier i1_3 (i.e., {}) is out of the range {}",
256
257 srsran_assert(pol_phase_shift_range.contains(pol_shift_id),
258 "The given polarization phase shift i2 (i.e., {}) is out of the range {}",
261
262 // Precoding weight matrix for two layers mapped into four antenna ports.
263 precoding_weight_matrix result(2, 4);
264
265 // Power normalization factor. It is equal to the square root of the number of ports times the number of layers.
266 static constexpr float scaling = 0.5F * M_SQRT1_2;
267
268 // Select k1 as per TS38.214 Section 5.2.2.2.1-3.
269 unsigned k1 = (beam_offset_id == 0) ? 0 : O_1;
270
271 // Phase increment for each beam coefficient. This defines the direction of the beam in the horizontal plane.
272 float phase_increment_rad = static_cast<float>(beam_azimuth_id) * 2.0F * M_PI / static_cast<float>(nof_beams);
273 // Polarization phase shift. This defines the relative phase between the cross-polarized antenna elements.
274 float pol_phase_shift_rad = M_PI_2 * static_cast<float>(pol_shift_id);
275
276 std::array<cf_t, N_1> beam;
277
278 // Layer 0.
279
280 // Beam for the first polarization.
281 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
282
283 // Set weights for the first polarization.
284 result.set_coefficient(beam[0], 0, 0);
285 result.set_coefficient(beam[1], 0, 1);
286
287 // Beam for the second polarization.
288 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad, scaling);
289
290 // Set weights for the second polarization.
291 result.set_coefficient(beam[0], 0, 2);
292 result.set_coefficient(beam[1], 0, 3);
293
294 // Layer 1. Recalculate phase increment for adjacent beam antenna elements.
295 phase_increment_rad = static_cast<float>(beam_azimuth_id + k1) * 2.0F * M_PI / static_cast<float>(nof_beams);
296
297 // Beam for the first polarization.
298 create_horizontal_beam(beam, phase_increment_rad, 0.0F, scaling);
299
300 // Set weights for the first polarization.
301 result.set_coefficient(beam[0], 1, 0);
302 result.set_coefficient(beam[1], 1, 1);
303
304 // Beam for the second polarization.
305 create_horizontal_beam(beam, phase_increment_rad, pol_phase_shift_rad + M_PI, scaling);
306
307 // Set weights for the second polarization.
308 result.set_coefficient(beam[0], 1, 2);
309 result.set_coefficient(beam[1], 1, 3);
310
311 return result;
312}

◆ make_two_layer_two_ports()

precoding_weight_matrix srsran::make_two_layer_two_ports ( unsigned i_codebook)

Constructs a precoding weight matrix for two layers mapped into two transmit ports.

All weights are derived from TS38.214 Table 5.2.2.2.1-1 for 2-layer CSI reporting.

Parameters
[in]i_codebookCodebook identifier.
Returns
A precoding weight matrix for two layers and two ports.
123{
124 static constexpr interval<unsigned, true> i_codebook_range(0, 1);
125 static constexpr cf_t dot_five = {0.5F, 0.0F};
126 static constexpr cf_t minus_dot_five = {-0.5F, 0.0F};
127 static constexpr cf_t j_dot_five = {0.0F, 0.5F};
128 static constexpr cf_t minus_j_dot_five = {0.0F, -0.5F};
129 static constexpr std::array<std::array<cf_t, 2>, 2> codebook0 = {{{dot_five, dot_five}, {dot_five, minus_dot_five}}};
130 static constexpr std::array<std::array<cf_t, 2>, 2> codebook1 = {
132
133 srsran_assert(i_codebook_range.contains(i_codebook),
134 "The given codebook identifier (i.e., {}) is out of the range {}",
137
138 precoding_weight_matrix result(2, 2);
139
140 // Select codebook.
141 const std::array<std::array<cf_t, 2>, 2>& codebook = (i_codebook == 0) ? codebook0 : codebook1;
142
143 // Set weights per port.
144 for (unsigned i_layer = 0; i_layer != 2; ++i_layer) {
146 for (unsigned i_port = 0; i_port != 2; ++i_port) {
147 result.set_coefficient(codebook_layer[i_port], i_layer, i_port);
148 }
149 }
150
151 return result;
152}

◆ map_cqi_to_aggregation_level()

aggregation_level srsran::map_cqi_to_aggregation_level ( cqi_value cqi,
cqi_table_t cqi_table,
span< const uint8_t > pdcch_candidates,
unsigned nof_dci_bits )

Computes PDCCH aggregation level to use based on the input parameters.

Parameters
[in]cqiCQI reported by the UE.
[in]cqi_tableCQI table to be used for the mapping.
[in]pdcch_candidatesPDCCH candidates per aggregation level, where aggregation level for the array element with index "x" is L=1U << x.
[in]nof_dci_bitsPDCCH DCI size in nof. bits.
Returns
PDCCH aggregation level if a valid candidate is found. Else, returns highest aggregation level with PDCCH candidate configured.
116{
117 for (unsigned aggr_lvl_index = 0; aggr_lvl_index < pdcch_candidates.size(); ++aggr_lvl_index) {
118 // Check whether PDCCH candidates are configured for aggregation level.
119 if (pdcch_candidates[aggr_lvl_index] == 0) {
120 continue;
121 }
123 // Check whether DCI fits in nof. CCEs of an aggregation level.
124 if (not does_dci_bits_fit_in_cces(nof_dci_bits, aggr_lvl)) {
125 continue;
126 }
127 // Check whether code rate is less than code rate at CQI reported by UE.
128 if (compute_pdcch_code_rate(nof_dci_bits, aggr_lvl) < get_target_code_rate(cqi, cqi_table)) {
129 return aggr_lvl;
130 }
131 }
132
133 // No valid aggregation level found.
134 // NOTE: This could be due to low CQI.
135 for (int aggr_lvl_index = static_cast<int>(pdcch_candidates.size() - 1); aggr_lvl_index >= 0; --aggr_lvl_index) {
136 if (pdcch_candidates[aggr_lvl_index] > 0) {
138 }
139 }
140 report_fatal_error("Invalid PDCCH candidates configuration");
141}
aggregation_level aggregation_index_to_level(uint8_t aggr_lvl_idx)
Return aggregation level enum value.
Definition aggregation_level.h:49

◆ map_cqi_to_mcs()

optional< sch_mcs_index > srsran::map_cqi_to_mcs ( unsigned cqi,
pdsch_mcs_table mcs_table )

Performs CQI to MCS mapping - for DL.

This is based on Tables 5.2.2.1-2, 5.2.2.1-3, 5.2.2.1-4 and Tables 5.1.3.1-1, 5.1.3.1-2, 5.1.3.1-3, TS 38.214.

Parameters
[in]cqiCQI reported by the UE.
[in]mcs_tableMCS table to be used for the mapping.
Returns
The MCS corresponding to map.
99{
101 if (cqi == 0 or cqi >= CQI_TABLE_SIZE) {
102 return nullopt;
103 }
104
105 switch (mcs_table) {
106 case pdsch_mcs_table::qam64:
107 return mcs.emplace(cqi_to_mcs_table[0][static_cast<size_t>(cqi)]);
108 case pdsch_mcs_table::qam256:
109 return cqi_to_mcs_table[1][static_cast<size_t>(cqi)];
110 case pdsch_mcs_table::qam64LowSe:
111 return cqi_to_mcs_table[2][static_cast<size_t>(cqi)];
112 default:
113 break;
114 }
115
116 // NOTE: if the MCS needs to be tweaked to compensate for any low BLER, do it here.
117 return mcs;
118}
constexpr T & emplace(Args &&... args) noexcept(std::is_nothrow_constructible< T, Args... >::value)
Constructs a new object of type T inside the optional<T>'s storage, and sets the optional state to no...
Definition optional.h:336

◆ map_snr_to_mcs_ul()

sch_mcs_index srsran::map_snr_to_mcs_ul ( double snr,
pusch_mcs_table mcs_table )

Maps the (PUSCH) SNR to a given MCS for PUSCH.

The objective of this function is to find the maximum MCS that can be used for a given SNR. TODO: revise this function once the SNR to BLER curves will have been prepared.

121{
122 // The objective of this function is to find the maximum MCS that can be used for a given SNR. A possible approach to
123 // this problem would be to get the iterator to the biggest element of the SNR vector not greater than the target SNR.
124 // Instead, we do the following: (i) we rely on the built-in function std::upper_bound(), which returns an iterator to
125 // the smallest element greater than the target SNR; (ii) we need to subtract 1 from the iterator returned by
126 // std::upper_bound(), to obtain wanted MCS.
127 span<const double> selected_mcs_table = ul_snr_mcs_table;
128 if (mcs_table == pusch_mcs_table::qam256) {
129 selected_mcs_table = ul_snr_256qam_mcs_table;
130 }
131 const unsigned MIN_MCS = 0;
132
133 // Check of the SNR is lower than the minimum, or greater than the maximum. If so, return the min or max MCS.
134 if (snr <= selected_mcs_table.front()) {
135 return MIN_MCS;
136 }
137 // NOTE: The sign > is not sufficient, as, with an input snr == ul_snr_mcs_table.back(), the std::upper_bound()
138 // below would return ul_snr_mcs_table.end(). To prevent this, we need the sign >= in the comparison.
139 if (snr >= selected_mcs_table.back()) {
140 return selected_mcs_table.size() - 1;
141 }
142
143 auto it_ub = std::upper_bound(selected_mcs_table.begin(), selected_mcs_table.end(), snr);
144
145 // NOTE: By design, it_ub > ul_snr_mcs_table.begin(). All SNR values such it_ub == ul_snr_mcs_table.begin() are
146 // handled above, in the "if (snr <= ul_snr_mcs_table.front())" statement above.
147 return it_ub - selected_mcs_table.begin() - 1;
148}

◆ mask_lsb_ones()

template<typename Integer >
constexpr Integer srsran::mask_lsb_ones ( size_t N)
constexpr

Returns an unsigned integer with the N least significant bits (LSB) set to zero, and the remaining bits set to 1.

Template Parameters
IntegerType of unsigned integer returned by the function.
Parameters
[in]NNumber of LSB bits set to zero.
Returns
Resulting integer bitmap.
55{
56 return mask_msb_zeros<Integer>(sizeof(Integer) * 8U - N);
57}

◆ mask_lsb_zeros()

template<typename Integer >
Integer srsran::mask_lsb_zeros ( size_t N)

Returns an unsigned integer with the N least significant bits (LSB) set to one, and the remaining bits set to zero.

Template Parameters
IntegerType of unsigned integer returned by the function.
Parameters
[in]NNumber of LSB bits set to one.
Returns
Resulting integer bitmap.
77{
78 return ~mask_lsb_ones<Integer>(N);
79}

◆ mask_msb_ones()

template<typename Integer >
constexpr Integer srsran::mask_msb_ones ( size_t N)
constexpr

Returns an unsigned integer with the N most significant bits (MSB) set to one, and the remaining bits set to zero.

Template Parameters
IntegerType of unsigned integer returned by the function.
Parameters
[in]NNumber of MSB bits set to one.
Returns
Resulting integer bitmap.
66{
67 return ~mask_msb_zeros<Integer>(N);
68}

◆ mask_msb_zeros()

template<typename Integer >
constexpr Integer srsran::mask_msb_zeros ( size_t N)
constexpr

Returns an unsigned integer with the N most significant bits (MSB) set to zero, and the remaining bits set to 1.

Template Parameters
IntegerType of unsigned integer returned by the function.
Parameters
[in]NNumber of MSB bits set to zero.
Returns
Resulting integer bitmap.
43{
44 static_assert(std::is_unsigned<Integer>::value, "T must be unsigned integer");
45 return (N == 0) ? static_cast<Integer>(-1) : (N == sizeof(Integer) * 8U) ? 0 : (static_cast<Integer>(-1) >> (N));
46}

◆ max()

slot_point srsran::max ( slot_point lhs,
slot_point rhs )
inline

Get maximum of two slot points.

267{
268 return lhs > rhs ? lhs : rhs;
269}

◆ max_nof_monitored_pdcch_candidates()

unsigned srsran::max_nof_monitored_pdcch_candidates ( subcarrier_spacing scs)
inline

Gets the maximum number of monitored PDCCH candidates per slot for a given subcarrier spacing, for a single serving cell, as per TS 38.213, Table 10.1-2.

43{
44 const static std::array<uint8_t, 4> max_monitored_pdcch_candidates_per_slot = {44, 36, 22, 20};
45 return max_monitored_pdcch_candidates_per_slot[to_numerology_value(scs)];
46}

◆ mcc_bytes_to_string()

std::string srsran::mcc_bytes_to_string ( uint8_t * mcc_bytes)
inline
86{
87 std::string mcc_str;
88 uint16_t mcc;
89 bytes_to_mcc(&mcc_bytes[0], &mcc);
90 if (!mcc_to_string(mcc, &mcc_str)) {
91 mcc_str = "000";
92 }
93 return mcc_str;
94}
bool bytes_to_mcc(const uint8_t *bytes, uint16_t *mcc)
Definition bcd_helpers.h:65

◆ mcc_to_bytes()

bool srsran::mcc_to_bytes ( uint16_t mcc,
uint8_t * bytes )
inline
75{
76 if ((mcc & 0xf000) != 0xf000) {
77 return false;
78 }
79 bytes[0] = (uint8_t)((mcc & 0xf00) >> 8);
80 bytes[1] = (uint8_t)((mcc & 0x0f0) >> 4);
81 bytes[2] = (uint8_t)(mcc & 0x00f);
82 return true;
83}

◆ mcc_to_string()

bool srsran::mcc_to_string ( uint16_t mcc,
std::string * str )
inline
51{
52 if ((mcc & 0xf000) != 0xf000) {
53 return false;
54 }
55 *str = "";
56 *str += ((mcc & 0x0f00) >> 8) + '0';
57 *str += ((mcc & 0x00f0) >> 4) + '0';
58 *str += (mcc & 0x000f) + '0';
59 return true;
60}

◆ MHz_to_bs_channel_bandwidth()

constexpr bs_channel_bandwidth_fr1 srsran::MHz_to_bs_channel_bandwidth ( unsigned bw)
inlineconstexpr

Converts the actual BW value in MHz to the BS channel bandwidth label.

57{
58 return static_cast<bs_channel_bandwidth_fr1>(bw);
59}
bs_channel_bandwidth_fr1
Labels for the BS Channel Bandwidth for FR1, described in TS38.104, Table 5.3.2-1.
Definition bs_channel_bandwidth.h:30

◆ min()

slot_point srsran::min ( slot_point lhs,
slot_point rhs )
inline

Get minimum of two slot points.

273{
274 return lhs < rhs ? lhs : rhs;
275}

◆ min_channel_bandwidth_to_MHz()

constexpr unsigned srsran::min_channel_bandwidth_to_MHz ( min_channel_bandwidth bw)
inlineconstexpr

Converts the Minimum Channel Bandwidth for FR1 into the actual BW value in MHz.

68{
69 switch (bw) {
70 case min_channel_bandwidth::MHz5:
71 return 5;
72 case min_channel_bandwidth::MHz10:
73 return 10;
74 case min_channel_bandwidth::MHz20:
75 return 20;
76 case min_channel_bandwidth::MHz40:
77 return 40;
78 default:
79 report_fatal_error("Un-supported minimum channel bw.");
80 }
81}

◆ mnc_bytes_to_string() [1/2]

std::string srsran::mnc_bytes_to_string ( uint8_t * mnc_bytes,
uint32_t nof_bytes )
inline
191{
192 std::string mnc_str;
193 uint16_t mnc;
194 bytes_to_mnc(&mnc_bytes[0], &mnc, nof_bytes);
195 if (!mnc_to_string(mnc, &mnc_str)) {
196 mnc_str = "000";
197 }
198 return mnc_str;
199}
bool bytes_to_mnc(const uint8_t *bytes, uint16_t *mnc, uint8_t len)
Definition bcd_helpers.h:145

◆ mnc_bytes_to_string() [2/2]

template<class Vec >
std::string srsran::mnc_bytes_to_string ( Vec mnc_bytes)
203{
204 return mnc_bytes_to_string(&mnc_bytes[0], mnc_bytes.size());
205}

◆ mnc_to_bytes() [1/2]

bool srsran::mnc_to_bytes ( uint16_t mnc,
uint8_t * bytes,
uint8_t * len )
inline
164{
165 if ((mnc & 0xf000) != 0xf000) {
166 *len = 0;
167 return false;
168 }
169 uint8_t count = 0;
170 if ((mnc & 0xff00) != 0xff00) {
171 bytes[count++] = (mnc & 0xf00) >> 8u;
172 }
173 bytes[count++] = (mnc & 0x00f0) >> 4u;
174 bytes[count++] = (mnc & 0x000f);
175 *len = count;
176 return true;
177}

◆ mnc_to_bytes() [2/2]

template<class Vec >
bool srsran::mnc_to_bytes ( uint16_t mnc,
Vec & vec )
181{
182 uint8_t len;
183 uint8_t v[3];
184 bool ret = mnc_to_bytes(mnc, &v[0], &len);
185 vec.resize(len);
186 memcpy(&vec[0], &v[0], len);
187 return ret;
188}

◆ mnc_to_string()

bool srsran::mnc_to_string ( uint16_t mnc,
std::string * str )
inline
128{
129 if ((mnc & 0xf000) != 0xf000) {
130 return false;
131 }
132 *str = "";
133 if ((mnc & 0xff00) != 0xff00) {
134 *str += ((mnc & 0x0f00) >> 8) + '0';
135 }
136 *str += ((mnc & 0x00f0) >> 4) + '0';
137 *str += (mnc & 0x000f) + '0';
138 return true;
139}

◆ modulation_scheme_from_string()

modulation_scheme srsran::modulation_scheme_from_string ( const std::string & mod_scheme_string)
inline

Converts a string into a modulation scheme.

Parameters
[in]mod_scheme_stringinput string.
Returns
The corresponding modulation_scheme.
77{
78 modulation_scheme mod_scheme = modulation_scheme::QAM256;
79 if (mod_scheme_string == "pi/2-BPSK") {
80 mod_scheme = modulation_scheme::PI_2_BPSK;
81 } else if (mod_scheme_string == "BPSK") {
82 mod_scheme = modulation_scheme::BPSK;
83 } else if (mod_scheme_string == "QPSK") {
84 mod_scheme = modulation_scheme::QPSK;
85 } else if (mod_scheme_string == "16QAM") {
86 mod_scheme = modulation_scheme::QAM16;
87 } else if (mod_scheme_string == "64QAM") {
88 mod_scheme = modulation_scheme::QAM64;
89 } else if (mod_scheme_string == "256QAM") {
90 mod_scheme = modulation_scheme::QAM256;
91 } else {
92 srsran_assertion_failure("Invalid modulation scheme: {}", mod_scheme_string);
93 }
94 return mod_scheme;
95}
modulation_scheme
Modulation schemes as described in TS38.211 Section 5.1.
Definition modulation_scheme.h:39

◆ ngap_mccmnc_to_plmn()

void srsran::ngap_mccmnc_to_plmn ( uint16_t mcc,
uint16_t mnc,
uint32_t * plmn )
inline

Convert BCD-coded MCC and MNC to PLMN. Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xf. MNC 001 represented as 0xf001 MNC 01 represented as 0xff01 PLMN encoded as per TS 38.413 sec 9.3.3.5

247{
248 uint8_t nibbles[6];
249 nibbles[1] = (mcc & 0x0f00) >> 8; // MCC digit 1
250 nibbles[0] = (mcc & 0x00f0) >> 4; // MCC digit 2
251 nibbles[3] = (mcc & 0x000f); // MCC digit 3
252
253 if ((mnc & 0xff00) == 0xff00) {
254 // 2-digit MNC
255 nibbles[2] = 0x0f; // MNC digit 1
256 nibbles[5] = (mnc & 0x00f0) >> 4; // MNC digit 2
257 nibbles[4] = (mnc & 0x000f); // MNC digit 3
258 } else {
259 // 3-digit MNC
260 nibbles[2] = (mnc & 0x0f00) >> 8; // MNC digit 1
261 nibbles[5] = (mnc & 0x00f0) >> 4; // MNC digit 2
262 nibbles[4] = (mnc & 0x000f); // MNC digit 3
263 }
264
265 *plmn = 0x000000;
266 *plmn |= nibbles[0] << 20;
267 *plmn |= nibbles[1] << 16;
268 *plmn |= nibbles[2] << 12;
269 *plmn |= nibbles[3] << 8;
270 *plmn |= nibbles[4] << 4;
271 *plmn |= nibbles[5];
272}

◆ ngap_plmn_to_mccmnc()

void srsran::ngap_plmn_to_mccmnc ( uint32_t plmn,
uint16_t * mcc,
uint16_t * mnc )
inline

Convert PLMN to BCD-coded MCC and MNC. Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xf. MNC 001 represented as 0xf001 MNC 01 represented as 0xff01 PLMN encoded as per TS 38.413 sec 9.3.3.5

213{
214 uint8_t nibbles[6];
215 nibbles[0] = (plmn & 0xf00000) >> 20;
216 nibbles[1] = (plmn & 0x0f0000) >> 16;
217 nibbles[2] = (plmn & 0x00f000) >> 12;
218 nibbles[3] = (plmn & 0x000f00) >> 8;
219 nibbles[4] = (plmn & 0x0000f0) >> 4;
220 nibbles[5] = (plmn & 0x00000f);
221
222 *mcc = 0xf000;
223 *mnc = 0xf000;
224 *mcc |= nibbles[1] << 8; // MCC digit 1
225 *mcc |= nibbles[0] << 4; // MCC digit 2
226 *mcc |= nibbles[3]; // MCC digit 3
227
228 if (nibbles[2] == 0xf) {
229 // 2-digit MNC
230 *mnc |= 0x0f00; // MNC digit 1
231 *mnc |= nibbles[5] << 4; // MNC digit 2
232 *mnc |= nibbles[4]; // MNC digit 3
233 } else {
234 // 3-digit MNC
235 *mnc |= nibbles[2] << 8; // MNC digit 1
236 *mnc |= nibbles[5] << 4; // MNC digit 2
237 *mnc |= nibbles[4]; // MNC digit 3
238 }
239}

◆ nof_slots_per_tdd_period()

unsigned srsran::nof_slots_per_tdd_period ( const tdd_ul_dl_config_common & cfg)
inline

Calculates number of slots, using TDD reference SCS, of the TDD UL-DL configuration.

57{
58 return cfg.pattern1.dl_ul_tx_period_nof_slots +
59 (cfg.pattern2.has_value() ? cfg.pattern2->dl_ul_tx_period_nof_slots : 0U);
60}
unsigned dl_ul_tx_period_nof_slots
Periodicity of the DL-UL pattern.
Definition tdd_ul_dl_config.h:35

◆ noop_coroutine()

coro_handle< noop_coroutine_promise > srsran::noop_coroutine ( )
inlinenoexcept
323{
324 class noop_frame final : public detail::base_coro_frame<noop_coroutine_promise>
325 {
326 void resume() final {}
327 void destroy() final {}
328 void on_return() final {}
329 };
330 static noop_frame frame;
331 return coro_handle<noop_coroutine_promise>{&frame};
332}

◆ nr_band_to_uint()

constexpr uint16_t srsran::nr_band_to_uint ( nr_band band)
inlineconstexpr
58{
59 return static_cast<uint16_t>(band);
60}

◆ nr_cgi_to_e1ap_asn1()

asn1::e1ap::nr_cgi_s srsran::nr_cgi_to_e1ap_asn1 ( const nr_cell_global_id_t & nr_cgi)
inline

Convert nr_cell_global_id_t to E1AP ASN.1.

Parameters
[in]nr_cgiThe common type nr cgi.
Returns
The ASN.1 nr cgi.
188{
189 asn1::e1ap::nr_cgi_s asn1_nr_cgi;
190
191 // nr cell id
192 asn1_nr_cgi.nr_cell_id.from_number(nr_cgi.nci);
193
194 // plmn id
195 asn1_nr_cgi.plmn_id.from_string(nr_cgi.plmn_hex);
196
197 return asn1_nr_cgi;
198}
Definition e1ap_ies.h:5299

◆ ntn_augment_rlc_parameters()

void srsran::ntn_augment_rlc_parameters ( const ntn_config & ntn_cfg,
std::map< srb_id_t, du_srb_config > & srb_cfgs )

Augments RLC parameters based on NTN configuration.

1834{
1835 // NTN is enabled, so we need to augment the RLC parameters for the NTN cell.
1836 for (auto& srb : srb_cfgs) {
1837 if (ntn_cfg.cell_specific_koffset > 1000) {
1838 srb.second.rlc.am.tx.t_poll_retx = 4000;
1839 } else if (ntn_cfg.cell_specific_koffset > 800) {
1840 srb.second.rlc.am.tx.t_poll_retx = 2000;
1841 } else if (ntn_cfg.cell_specific_koffset > 500) {
1842 srb.second.rlc.am.tx.t_poll_retx = 2000;
1843 } else if (ntn_cfg.cell_specific_koffset > 300) {
1844 srb.second.rlc.am.tx.t_poll_retx = 1000;
1845 } else if (ntn_cfg.cell_specific_koffset > 200) {
1846 srb.second.rlc.am.tx.t_poll_retx = 800;
1847 } else if (ntn_cfg.cell_specific_koffset > 100) {
1848 srb.second.rlc.am.tx.t_poll_retx = 400;
1849 } else if (ntn_cfg.cell_specific_koffset > 50) {
1850 srb.second.rlc.am.tx.t_poll_retx = 200;
1851 } else if (ntn_cfg.cell_specific_koffset > 10) {
1852 srb.second.rlc.am.tx.t_poll_retx = 100;
1853 } else {
1854 srb.second.rlc.am.tx.t_poll_retx = 50;
1855 }
1856 }
1857}
unsigned cell_specific_koffset
Definition ntn.h:69

◆ ofdm_symbol_range_to_sliv()

uint32_t srsran::ofdm_symbol_range_to_sliv ( ofdm_symbol_range symb_range)
inline

Converts OFDM symbol range to SLIV.

Parameters
[out]symbolsSymbol interval as [S, S+L).
[in]slivAn index giving a combination (jointly encoded) of start symbols and length indicator (SLIV).
50{
51 return sliv_from_s_and_l(NOF_OFDM_SYM_PER_SLOT_NORMAL_CP, symb_range.start(), symb_range.length());
52}
constexpr unsigned sliv_from_s_and_l(unsigned N, unsigned S, unsigned L)
Convert start S and length L into SLIV.
Definition sliv.h:33

◆ offload_to_executor()

template<typename DispatchTaskExecutor , typename ResumeTaskExecutor , typename Callable , typename ResultType = detail::function_return_t<decltype(&std::decay_t<Callable>::operator())>, std::enable_if_t< not std::is_same< ResultType, void >::value, int > = 0>
auto srsran::offload_to_executor ( DispatchTaskExecutor & dispatch_exec,
ResumeTaskExecutor & resume_exec,
Callable && callable )

Returns an awaitable that performs a task in a "dispatch_exec" executor, and resumes in "resume_exec" executor. Note: This is a specialization for tasks with non-void return values.

Parameters
dispatch_exectask executor where given task is going to run.
resume_exectask executor where coroutine will resume once the task is run.
callabletask to run.
Returns
awaitable.
110{
111 struct task_executor_offloader {
112 task_executor_offloader(DispatchTaskExecutor& dispatch_exec_,
113 ResumeTaskExecutor& resume_exec_,
114 Callable callable_) :
115 dispatch_exec(dispatch_exec_), resume_exec(resume_exec_), task(std::forward<Callable>(callable_))
116 {
117 }
118
119 bool await_ready() noexcept { return false; }
120
121 void await_suspend(coro_handle<> suspending_coro)
122 {
123 continuation = suspending_coro;
124 bool dispatched1 = dispatch_exec.execute([this]() mutable {
125 result = task();
126 bool dispatched2 = resume_exec.execute([this]() { continuation.resume(); });
127 srsran_assert(dispatched2, "Failed to dispatch task");
128 });
129 srsran_assert(dispatched1, "Failed to dispatch task");
130 }
131
132 ResultType await_resume() { return result; }
133
134 task_executor_offloader& get_awaiter() { return *this; }
135
136 private:
137 DispatchTaskExecutor& dispatch_exec;
138 ResumeTaskExecutor& resume_exec;
139 Callable task;
140 ResultType result;
141 coro_handle<> continuation;
142 };
143 return task_executor_offloader{dispatch_exec, resume_exec, std::forward<Callable>(callable)};
144}

◆ open_trace_file()

void srsran::open_trace_file ( const std::string & trace_file_name = "/tmp/srsran_trace.json")

Open a file to write trace events to.

145{
146 if (trace_file_writer != nullptr) {
147 report_fatal_error("Trace file already open");
148 }
149 trace_file_writer = std::make_unique<event_trace_writer>(trace_file_name.c_str());
150}

◆ operator!=() [1/7]

200{
201 return !(lhs == rhs);
202}

◆ operator!=() [2/7]

template<typename ComplexType >
bool srsran::operator!= ( const complex_normal_distribution< ComplexType > & distr1,
const complex_normal_distribution< ComplexType > & distr2 )

Checks whether two complex normal distributions are different.

162{
163 return !(distr1 == distr2);
164}

◆ operator!=() [3/7]

template<typename T >
bool srsran::operator!= ( const interval< T > & lhs,
const interval< T > & rhs )
147{
148 return not(lhs == rhs);
149}

◆ operator!=() [4/7]

template<typename T >
bool srsran::operator!= ( const optional< T > & lhs,
const optional< T > & rhs )
noexcept
370{
371 return not(lhs == rhs);
372}

◆ operator!=() [5/7]

template<typename T >
bool srsran::operator!= ( const optional< T > & lhs,
const T & rhs )
noexcept
376{
377 return not(lhs == rhs);
378}

◆ operator!=() [6/7]

template<typename T >
bool srsran::operator!= ( const T & lhs,
const optional< T > & rhs )
noexcept
382{
383 return not(lhs == rhs);
384}

◆ operator!=() [7/7]

template<typename T >
bool srsran::operator!= ( span< T > lhs,
span< T > rhs )
inline
254{
255 return not lhs.equals(rhs);
256}
bool equals(span rhs) const
Returns true if the input span has the same elements as this.
Definition span.h:239

◆ operator&() [1/2]

template<size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N, LowestInfoBitIsMSB > srsran::operator& ( const bounded_bitset< N, LowestInfoBitIsMSB > & lhs,
const bounded_bitset< N, LowestInfoBitIsMSB > & rhs )
inlinenoexcept

Bitwise AND operation result = lhs & rhs.

Returns
new bounded_bitset that results from the Bitwise AND operation.
1373{
1375 res &= rhs;
1376 return res;
1377}

◆ operator&() [2/2]

template<typename T >
interval< T > srsran::operator& ( const interval< T > & lhs,
const interval< T > & rhs )

Make intersection of intervals.

172{
173 if (not lhs.overlaps(rhs)) {
174 return interval<T>{};
175 }
176 return interval<T>{std::max(lhs.start(), rhs.start()), std::min(lhs.stop(), rhs.stop())};
177}
bool overlaps(interval other) const
If this and other intervals overlap.
Definition interval.h:109

◆ operator+() [1/4]

slot_point srsran::operator+ ( int jump,
slot_point slot )
inline
250{
251 slot += jump;
252 return slot;
253}

◆ operator+() [2/4]

template<typename Integer >
slot_point srsran::operator+ ( slot_point slot,
Integer jump )
inline

Sum and subtraction operations between slot_point types.

239{
240 static_assert(std::is_integral<Integer>::value, "Invalid integer type");
241 slot += jump;
242 return slot;
243}

◆ operator+() [3/4]

Implements the + operator for sr_nof_bits.

46{
47 const unsigned sum = sr_nof_bits_to_uint(x) + sr_nof_bits_to_uint(y);
48 return sum > sr_nof_bits_to_uint(sr_nof_bits::four) ? sr_nof_bits::four : static_cast<sr_nof_bits>(sum);
49}
sr_nof_bits
Definition scheduler_pucch_format.h:36
unsigned sr_nof_bits_to_uint(sr_nof_bits sr_bits)
Converts sr_nof_bits into unsigned.
Definition scheduler_pucch_format.h:39

◆ operator+() [4/4]

245{
246 slot += jump;
247 return slot;
248}

◆ operator-() [1/3]

Reduce priority by dec amount.

738{
739 return static_cast<enqueue_priority>(static_cast<size_t>(lhs) - dec);
740}
enqueue_priority
Queue priority used to map to specific queue of the priority_multiqueue_task_worker....
Definition concurrent_queue.h:734

◆ operator-() [2/3]

slot_point srsran::operator- ( slot_point slot,
int jump )
inline
260{
261 slot -= jump;
262 return slot;
263}

◆ operator-() [3/3]

255{
256 slot -= jump;
257 return slot;
258}

◆ operator<() [1/4]

205{
206 srsran_assert(lhs.type() != rhs.type(), "Cannot compare UEIDs of different types.");
207 switch (lhs.type()) {
208 case asn1::e2sm_kpm::ueid_c::types_opts::gnb_du_ueid:
209 if (lhs.gnb_du_ueid() < rhs.gnb_du_ueid()) {
210 return true;
211 }
212 default:
213 return false;
214 }
215}

◆ operator<() [2/4]

223{
224 return lhs.gnb_cu_ue_f1_ap_id < rhs.gnb_cu_ue_f1_ap_id;
225}

◆ operator<() [3/4]

template<typename T >
bool srsran::operator< ( const interval< T > & lhs,
const interval< T > & rhs )

Compares interval starting points. In case the starting point is the same, the interval with shorter length is the lowest.

155{
156 return lhs.start() < rhs.start() or (lhs.start() == rhs.start() and lhs.stop() < rhs.stop());
157}

◆ operator<() [4/4]

template<typename T >
bool srsran::operator< ( const optional< T > & lhs,
const optional< T > & rhs )
noexcept
388{
389 return rhs.has_value() and ((lhs.has_value() and lhs.value() < rhs.value()) or (not lhs.has_value()));
390}

◆ operator==() [1/9]

183{
184 if (lhs.type() != rhs.type()) {
185 return false;
186 }
187
188 // TODO: add support for all types
189 switch (lhs.type()) {
190 case asn1::e2sm_kpm::ueid_c::types_opts::gnb_du_ueid:
191 if (lhs.gnb_du_ueid() == rhs.gnb_du_ueid()) {
192 return true;
193 }
194 default:
195 return false;
196 }
197}

◆ operator==() [2/9]

218{
219 return lhs.gnb_cu_ue_f1_ap_id == rhs.gnb_cu_ue_f1_ap_id;
220}

◆ operator==() [3/9]

154{
155 return ((distr1.parameters == distr2.parameters) && (distr1.real_normal == distr2.real_normal));
156}

◆ operator==() [4/9]

template<typename T >
bool srsran::operator== ( const interval< T > & lhs,
const interval< T > & rhs )
141{
142 return lhs.start() == rhs.start() and lhs.stop() == rhs.stop();
143}

◆ operator==() [5/9]

template<typename T >
bool srsran::operator== ( const optional< T > & lhs,
const optional< T > & rhs )
noexcept
352{
353 return lhs.has_value() == rhs.has_value() and (not lhs.has_value() or lhs.value() == rhs.value());
354}

◆ operator==() [6/9]

template<typename T >
bool srsran::operator== ( const optional< T > & lhs,
const T & rhs )
noexcept
358{
359 return lhs.has_value() and lhs.value() == rhs;
360}

◆ operator==() [7/9]

bool srsran::operator== ( const re_pattern & pattern1,
const re_pattern & pattern2 )
inline

Checks if two RE patterns are equal.

Two RE patterns are equal if their attributes are equal.

121{
122 if (pattern1.symbols != pattern2.symbols) {
123 return false;
124 }
125
126 if (pattern1.prb_mask != pattern2.prb_mask) {
127 return false;
128 }
129
130 if (pattern1.re_mask != pattern2.re_mask) {
131 return false;
132 }
133
134 return true;
135}
bounded_bitset< MAX_RB > prb_mask
Physical resource block mask.
Definition re_pattern.h:37
symbol_slot_mask symbols
Symbol mask. True entries indicate the symbols affected by the pattern.
Definition re_pattern.h:41
re_prb_mask re_mask
Resource element mask per resource block. True entries indicate the resource elements affected by the...
Definition re_pattern.h:39

◆ operator==() [8/9]

template<typename T >
bool srsran::operator== ( const T & lhs,
const optional< T > & rhs )
noexcept
364{
365 return rhs.has_value() and lhs == rhs.value();
366}

◆ operator==() [9/9]

template<typename T >
bool srsran::operator== ( span< T > lhs,
span< T > rhs )
inline
248{
249 return lhs.equals(rhs);
250}

◆ operator|() [1/3]

template<size_t N, bool LowestInfoBitIsMSB>
bounded_bitset< N, LowestInfoBitIsMSB > srsran::operator| ( const bounded_bitset< N, LowestInfoBitIsMSB > & lhs,
const bounded_bitset< N, LowestInfoBitIsMSB > & rhs )
inlinenoexcept

Bitwise AND operation result = lhs | rhs.

Returns
new bounded_bitset that results from the Bitwise OR operation.
1384{
1386 res |= rhs;
1387 return res;
1388}

◆ operator|() [2/3]

125{
126 return bwp_rb_bitmap(lhs) |= rhs;
127}
Definition scheduler_prb.h:32

◆ operator|() [3/3]

template<typename T >
interval< T > srsran::operator| ( const interval< T > & lhs,
const interval< T > & rhs )

Make union of intervals. If intervals do not overlap, the empty interval is returned.

162{
163 if (not lhs.overlaps(rhs)) {
164 return interval<T>{};
165 }
166 return {std::min(lhs.start(), rhs.start()), std::max(lhs.stop(), rhs.stop())};
167}

◆ operator|=()

prb_bitmap & srsran::operator|= ( prb_bitmap & prb_bits,
const prb_interval & grant )
inline
151{
152 prb_bits.fill(grant.start(), grant.stop());
153 return prb_bits;
154}
void fill(bool val=true) noexcept
Set all bits in the bounded_bitset to true/false. The size of the bitset is maintained.
Definition bounded_bitset.h:422

◆ p_cmax_to_dbm_range()

p_cmax_dbm_range srsran::p_cmax_to_dbm_range ( unsigned p_cmax)
inline

Converts P_CMAX,f,c value reported by UE to dBm interval based on mapping defined in Table 10.1.18.1-1 of TS 38.133.

Parameters
[in]p_cmaxP_CMAX,f,c value reported by UE. This field maps to PH in table 6.1.3.8-2 of TS 38.321.
Returns
Returns the dBm interval to which reported P_CMAX,f,c maps to.
57{
58 static const int p_cmax_min_db_value = -29;
59 static const int p_cmax_max_db_value = 33;
60
61 if (p_cmax == 0) {
62 // P_CMAX,f,c is < -29dBm.
63 return {p_cmax_min_db_value, p_cmax_min_db_value};
64 }
65 if (p_cmax == 63) {
66 // P_CMAX,f,c is >= 33dBm.
67 return {p_cmax_max_db_value, p_cmax_max_db_value};
68 }
69 return {p_cmax_min_db_value + p_cmax - 1, p_cmax_min_db_value + p_cmax};
70}

◆ pcdp_sn_cardinality()

constexpr uint32_t srsran::pcdp_sn_cardinality ( uint16_t sn_size)
constexpr

Returns the value range of the sequence numbers.

Parameters
sn_sizeLength of the sequence number field in bits
Returns
cardinality of sn_size
66{
67 srsran_assert(sn_size < 32, "Cardinality of sn_size={} exceeds return type 'uint32_t'", sn_size);
68 return (1 << sn_size);
69}

◆ pdcch_candidates_common_ss_get_lowest_cce()

pdcch_candidate_list srsran::pdcch_candidates_common_ss_get_lowest_cce ( const pdcch_candidates_common_ss_configuration & config)

Generates a PDCCH candidate list for Common SS as per TS38.213 Section 10.1.

An assertion is triggered if the number of CCEs for the aggregation level exceeds the number of CCE in the CORESET.

The resultant list contains the lowest CCE index of the config.nof_candidates.

60{
61 unsigned Y_p = 0;
62 unsigned n_ci = 0;
63
64 return pdcch_candidates_get_lowest_cce(
65 Y_p, n_ci, to_nof_cces(config.al), config.nof_candidates, config.nof_cce_coreset);
66}
unsigned to_nof_cces(aggregation_level lvl)
Calculates number of CCEs based on Aggregation Level as per TS38.211 Table 7.3.2.1-1.
Definition aggregation_level.h:37
aggregation_level al
Aggregation level .
Definition pdcch_candidates.h:66
unsigned nof_candidates
Number of PDCCH candidates the UE is configured to monitor for aggregation level of a search space ...
Definition pdcch_candidates.h:69
unsigned nof_cce_coreset
Number of CCEs contained in CORESET , .
Definition pdcch_candidates.h:71

◆ pdcch_candidates_ue_ss_get_lowest_cce()

pdcch_candidate_list srsran::pdcch_candidates_ue_ss_get_lowest_cce ( const pdcch_candidates_ue_ss_configuration & config)

Generates a PDCCH candidate list for UE-Specific SS as per TS38.213 Section 10.1.

An assertion is triggered if the number of candidates times the aggregation level exceeds the number of CCE in the CORESET.

The resultant list contains the lowest CCE index of the config.nof_candidates.

69{
70 static const std::array<unsigned, 3> A_p_values = {39827, 39829, 39839};
71 const unsigned n_ci = 0;
72
73 const unsigned A_p = A_p_values[static_cast<size_t>(config.cs_id) % A_p_values.size()];
74 const unsigned D = 65537;
75 const unsigned Y_p = pdcch_candidates_ue_ss_get_Y_p(A_p, D, to_value(config.rnti), config.slot_index);
76
77 return pdcch_candidates_get_lowest_cce(
78 Y_p, n_ci, to_nof_cces(config.al), config.nof_candidates, config.nof_cce_coreset);
79}
constexpr uint16_t to_value(rnti_t rnti)
Converts RNTI value to integer.
Definition rnti.h:57
coreset_id cs_id
CORESET identifier. Parameter .
Definition pdcch_candidates.h:100
unsigned slot_index
Slot index within the radio frame. Parameter .
Definition pdcch_candidates.h:104
rnti_t rnti
Parameter .
Definition pdcch_candidates.h:102
aggregation_level al
Aggregation level .
Definition pdcch_candidates.h:93
unsigned nof_cce_coreset
Number of CCEs contained in CORESET , .
Definition pdcch_candidates.h:98
unsigned nof_candidates
Number of PDCCH candidates the UE is configured to monitor for aggregation level of a search space ...
Definition pdcch_candidates.h:96

◆ pdcch_type0_css_coreset_get()

pdcch_type0_css_coreset_description srsran::pdcch_type0_css_coreset_get ( nr_band band,
subcarrier_spacing ssb_scs,
subcarrier_spacing pdcch_scs,
uint8_t coreset_zero_index,
uint8_t subcarrier_offset )

Get the CORESET configuration for Type0-PDCCH CSS.

The CORESET configuration is retrieved as per TS38.213 Tables 13-1, 13-2, 13-3, 13-4, 13-5, 13-6, 13-7, 13-8, 13-9 and 13-10 depending on the subcarrier combination of the SS/PBCH block and PDCCH, and the minimum channel bandwidth.

Parameters
[in]bandBand minimum bandwidth in MHz as per TS38.104 Table 5.3.5-1 for FR 1 and Table 5.3.5-2 for FR2. This is ignored in case the band is restricted to operation with shared spectrum channel access.
[in]ssb_scsSS/PBCH block subcarrier spacing.
[in]pdcch_scsPDCCH subcarrier spacing.
[in]coreset_zero_indexParameter controlResourceSetZero as per TS38.331 PDCCH-ConfigSIB1.
[in]subcarrier_offsetOffset between the CRB and the beginning of the SS/PBCH block.
Returns
A valid CORESET description if config is valid. Otherwise, PDCCH_TYPE0_CSS_CORESET_RESERVED.
35{
36 // TS38.213 Table 13-1. {SS/PBCH block, PDCCH} SCS is {15, 15} kHz and minimum channel bandwidth 5 MHz or 10 MHz.
37 static const std::array<pdcch_type0_css_coreset_description, 15> TABLE_13_1 = {{
38 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 0},
39 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 2},
40 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 4},
41 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 0},
42 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 2},
43 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 4},
44 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 12},
45 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 16},
46 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 12},
47 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 16},
48 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 12},
49 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 16},
50 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 38},
51 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 38},
52 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 3, 38},
53 }};
54 // TS38.213 Table 13-1A (Only in Rel.17). {SS/PBCH block, PDCCH} SCS is {15, 15} kHz for frequency bands operated with
55 // shared spectrum channel access.
56 static const std::array<pdcch_type0_css_coreset_description, 8> TABLE_13_1_A = {{
57 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 10},
58 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 12},
59 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 14},
60 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 16},
61 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 10},
62 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 12},
63 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 14},
64 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 16},
65 }};
66 // TS38.213 Table 13-2. {SS/PBCH block, PDCCH} SCS is {15, 30} kHz and minimum channel bandwidth 5 MHz or 10 MHz.
67 static const std::array<pdcch_type0_css_coreset_description, 14> TABLE_13_2 = {{
68 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 5},
69 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 6},
70 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 7},
71 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 8},
72 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 5},
73 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 6},
74 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 7},
75 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 8},
76 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 18},
77 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 20},
78 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 18},
79 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 20},
80 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 18},
81 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 20},
82 }};
83 // TS38.213 Table 13-3. {SS/PBCH block, PDCCH} SCS is {30, 15} kHz and minimum channel bandwidth 5 MHz or 10 MHz.
84 static const std::array<pdcch_type0_css_coreset_description, 9> TABLE_13_3 = {{
85 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 2},
86 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 6},
87 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 2},
88 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 6},
89 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 2},
90 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 6},
91 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 28},
92 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 28},
93 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 3, 28},
94 }};
95 // TS38.213 Table 13-4. {SS/PBCH block, PDCCH} SCS is {30, 30} kHz and minimum channel bandwidth 5 MHz or 10 MHz.
96 static const std::array<pdcch_type0_css_coreset_description, 16> TABLE_13_4 = {{
97 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 0},
98 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 1},
99 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 2},
100 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 3},
101 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 4},
102 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 0},
103 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 1},
104 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 2},
105 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 3},
106 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 4},
107 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 12},
108 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 14},
109 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 16},
110 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 12},
111 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 14},
112 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 16},
113 }};
114 // TS38.213 Table 13-4A (Only in Rel.17). {SS/PBCH block, PDCCH} SCS is {30, 30} kHz for frequency bands operated with
115 // shared spectrum channel access.
116 static const std::array<pdcch_type0_css_coreset_description, 8> TABLE_13_4_A = {{
117 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 0},
118 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 1},
119 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 2},
120 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 3},
121 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 0},
122 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 1},
123 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 2},
124 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 3},
125 }};
126 // TS38.213 Table 13-5. {SS/PBCH block, PDCCH} SCS is {30, 15} kHz and minimum channel bandwidth 40 MHz.
127 static const std::array<pdcch_type0_css_coreset_description, 9> TABLE_13_5 = {{
128 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 4},
129 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 4},
130 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 4},
131 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 0},
132 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 56},
133 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 0},
134 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 56},
135 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 3, 0},
136 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 3, 56},
137 }};
138 // TS38.213 Table 13-6. {SS/PBCH block, PDCCH} SCS is {30, 30} kHz and minimum channel bandwidth 40 MHz.
139 static const std::array<pdcch_type0_css_coreset_description, 10> TABLE_13_6 = {{
140 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 0},
141 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 4},
142 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 0},
143 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 3, 4},
144 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 0},
145 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 28},
146 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 0},
147 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 28},
148 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 0},
149 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 28},
150 }};
151 // TS38.213 Table 13-7. {SS/PBCH block, PDCCH} SCS is {120, 60} kHz
152 static const std::array<pdcch_type0_css_coreset_description, 12> TABLE_13_7 = {{
153 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 0},
154 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 8},
155 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 0},
156 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 8},
157 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 0},
158 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 3, 8},
159 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 28},
160 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 28},
161 {ssb_coreset0_mplex_pattern::mplx_pattern2, 48, 1, -41},
162 {ssb_coreset0_mplex_pattern::mplx_pattern2, 48, 1, 49},
163 {ssb_coreset0_mplex_pattern::mplx_pattern2, 96, 1, -41},
164 {ssb_coreset0_mplex_pattern::mplx_pattern2, 96, 1, 97},
165 }};
166 // TS38.213 Table 13-8. {SS/PBCH block, PDCCH} SCS is {120, 120} kHz
167 static const std::array<pdcch_type0_css_coreset_description, 8> TABLE_13_8 = {{
168 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 0},
169 {ssb_coreset0_mplex_pattern::mplx_pattern1, 24, 2, 4},
170 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 14},
171 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 14},
172 {ssb_coreset0_mplex_pattern::mplx_pattern3, 24, 2, -20},
173 {ssb_coreset0_mplex_pattern::mplx_pattern3, 24, 2, 24},
174 {ssb_coreset0_mplex_pattern::mplx_pattern3, 48, 2, -20},
175 {ssb_coreset0_mplex_pattern::mplx_pattern3, 48, 2, 48},
176 }};
177 // TS38.213 Table 13-9. {SS/PBCH block, PDCCH} SCS is {240, 60} kHz
178 static const std::array<pdcch_type0_css_coreset_description, 4> TABLE_13_9 = {{
179 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 0},
180 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 1, 16},
181 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 0},
182 {ssb_coreset0_mplex_pattern::mplx_pattern1, 96, 2, 16},
183 }};
184 // TS38.213 Table 13-10. {SS/PBCH block, PDCCH} SCS is {240, 120} kHz
185 static const std::array<pdcch_type0_css_coreset_description, 8> TABLE_13_10 = {{
186 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 0},
187 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 1, 8},
188 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 0},
189 {ssb_coreset0_mplex_pattern::mplx_pattern1, 48, 2, 8},
190 {ssb_coreset0_mplex_pattern::mplx_pattern2, 24, 1, -41},
191 {ssb_coreset0_mplex_pattern::mplx_pattern2, 24, 1, 25},
192 {ssb_coreset0_mplex_pattern::mplx_pattern2, 48, 1, -41},
193 {ssb_coreset0_mplex_pattern::mplx_pattern2, 48, 1, 49},
194 }};
195
196 const min_channel_bandwidth minimum_bandwidth_MHz = band_helper::get_min_channel_bw(band, pdcch_scs);
197 const bool is_for_shared_spectrum = band_helper::is_band_for_shared_spectrum(band);
198
199 // As per TS 38.101, Table 5.2-1, band n79 and n104 use Table 13-5 and Table 13-6, regardless of the minimum
200 // channel BW.
201 const bool is_40mhz_min_ch_bw_equivalent = band_helper::is_band_40mhz_min_ch_bw_equivalent(band);
202
204
205 // Start from the bands with is_40mhz_min_ch_bw_equivalent == true, as these use Table 13-5 and Table 13-6,
206 // regardless of the minimum channel BW.
207 if (ssb_scs == subcarrier_spacing::kHz30 && pdcch_scs == subcarrier_spacing::kHz15 &&
208 (minimum_bandwidth_MHz == min_channel_bandwidth::MHz40 or is_40mhz_min_ch_bw_equivalent)) {
209 table = TABLE_13_5;
210 } else if (ssb_scs == subcarrier_spacing::kHz30 && pdcch_scs == subcarrier_spacing::kHz30 &&
211 (minimum_bandwidth_MHz == min_channel_bandwidth::MHz40 or is_40mhz_min_ch_bw_equivalent)) {
212 table = TABLE_13_6;
213 }
214 // Consider the bands with minimum channel BW 5MHz or 10MHz.
215 else if (ssb_scs == subcarrier_spacing::kHz15 && pdcch_scs == subcarrier_spacing::kHz15 && is_for_shared_spectrum) {
216 table = TABLE_13_1_A;
217 } else if (ssb_scs == subcarrier_spacing::kHz15 && pdcch_scs == subcarrier_spacing::kHz15 &&
218 (minimum_bandwidth_MHz == min_channel_bandwidth::MHz5 ||
219 minimum_bandwidth_MHz == min_channel_bandwidth::MHz10)) {
220 table = TABLE_13_1;
221 } else if (ssb_scs == subcarrier_spacing::kHz15 && pdcch_scs == subcarrier_spacing::kHz30 &&
222 (minimum_bandwidth_MHz == min_channel_bandwidth::MHz5 ||
223 minimum_bandwidth_MHz == min_channel_bandwidth::MHz10)) {
224 table = TABLE_13_2;
225 } else if (ssb_scs == subcarrier_spacing::kHz30 && pdcch_scs == subcarrier_spacing::kHz15 &&
226 (minimum_bandwidth_MHz == min_channel_bandwidth::MHz5 ||
227 minimum_bandwidth_MHz == min_channel_bandwidth::MHz10)) {
228 table = TABLE_13_3;
229 } else if (ssb_scs == subcarrier_spacing::kHz30 && pdcch_scs == subcarrier_spacing::kHz30 && is_for_shared_spectrum) {
230 table = TABLE_13_4_A;
231 } else if (ssb_scs == subcarrier_spacing::kHz30 && pdcch_scs == subcarrier_spacing::kHz30 &&
232 (minimum_bandwidth_MHz == min_channel_bandwidth::MHz5 ||
233 minimum_bandwidth_MHz == min_channel_bandwidth::MHz10)) {
234 table = TABLE_13_4;
235 } else if (ssb_scs == subcarrier_spacing::kHz120 && pdcch_scs == subcarrier_spacing::kHz60) {
236 table = TABLE_13_7;
237 } else if (ssb_scs == subcarrier_spacing::kHz120 && pdcch_scs == subcarrier_spacing::kHz120) {
238 table = TABLE_13_8;
239 } else if (ssb_scs == subcarrier_spacing::kHz240 && pdcch_scs == subcarrier_spacing::kHz60) {
240 table = TABLE_13_9;
241 } else if (ssb_scs == subcarrier_spacing::kHz240 && pdcch_scs == subcarrier_spacing::kHz120) {
242 table = TABLE_13_10;
243 }
244
245 if (coreset_zero_index < table.size()) {
247
248 if (result.offset < 0 && subcarrier_offset != 0) {
249 --result.offset;
250 }
251
252 return result;
253 }
254
255 return PDCCH_TYPE0_CSS_CORESET_RESERVED;
256}
min_channel_bandwidth
Definition bs_channel_bandwidth.h:64
Describes the CORESET for Type0-PDCCH CSS.
Definition pdcch_type0_css_coreset_config.h:35

◆ pdcch_type0_css_occasions_get_pattern1()

Get Type0-PDCCH CSS occasions for multiplexing pattern 1 as per TS38.213 Section 13.

The Type0-PDCCH CSS occasions are retrieved from TS38.213 Table 13-11 for FR1 and Table 13-12 for FR2.

An assertion is triggered if config is not valid.

Parameters
[in]configProvides the necessary parameters to calculate the occasions.
Returns
A valid Type0-PDCCH CSS occasion for multiplexing pattern 1.
29{
30 srsran_assert((!config.is_fr2 && config.ss_zero_index < 16) || (config.is_fr2 && config.ss_zero_index < 14),
31 "SearchSpaceZero ({}) must be (0...{}) for {}.",
32 config.ss_zero_index,
33 config.is_fr2 ? 13 : 15,
34 config.is_fr2 ? "FR2" : "FR1");
35
36 static const unsigned N_SYMB_CORESET = UINT32_MAX;
37
38 // TS38.213 Table 13-11 for FR1.
39 static const std::array<pdcch_type0_css_occasion_pattern1_description, 16> TABLE_FR1 = {{
40 {0, 1.0, {0}},
41 {0, 0.5, {0, N_SYMB_CORESET}},
42 {2, 1.0, {0}},
43 {2, 0.5, {0, N_SYMB_CORESET}},
44 {5, 1.0, {0}},
45 {5, 0.5, {0, N_SYMB_CORESET}},
46 {7, 1.0, {0}},
47 {7, 0.5, {0, N_SYMB_CORESET}},
48 {0, 2.0, {0}},
49 {5, 2.0, {0}},
50 {0, 1.0, {1}},
51 {0, 1.0, {2}},
52 {2, 1.0, {1}},
53 {2, 1.0, {2}},
54 {5, 1.0, {1}},
55 {5, 1.0, {2}},
56 }};
57
58 // TS38.213 Table 13-12 for FR2.
59 static const std::array<pdcch_type0_css_occasion_pattern1_description, 14> TABLE_FR2 = {{
60 {0, 1.0, {0}},
61 {0, 0.5, {0, 7}},
62 {2.5, 1.0, {0}},
63 {2.5, 0.5, {0, 7}},
64 {5.0, 1.0, {0}},
65 {5.0, 0.5, {0, 7}},
66 {0.0, 0.5, {0, N_SYMB_CORESET}},
67 {2.5, 0.5, {0, N_SYMB_CORESET}},
68 {5.0, 0.5, {0, N_SYMB_CORESET}},
69 {7.5, 1.0, {0}},
70 {7.5, 0.5, {0, 7}},
71 {7.5, 0.5, {0, N_SYMB_CORESET}},
72 {0.0, 2.0, {0}},
73 {5.0, 2.0, {0}},
74 }};
75
76 // Select occasion from the tables.
78 if (config.is_fr2) {
79 occasion = TABLE_FR2[config.ss_zero_index];
80 }
81
82 // Substitute the start symbol with the CORESET number of symbols.
83 if (occasion.start_symbol.size() == occasion.MAX_NOF_OCCASIONS_PER_SLOT and
84 occasion.start_symbol.back() == N_SYMB_CORESET) {
85 occasion.start_symbol.back() = config.nof_symb_coreset;
86 }
87
88 return occasion;
89}
uint8_t ss_zero_index
Higher layer parameter searchSpaceZero as per TS38.331 PDCCH-ConfigSIB1.
Definition pdcch_type0_css_occasions.h:35
bool is_fr2
Set to true for FR2, otherwise it uses FR1.
Definition pdcch_type0_css_occasions.h:33
unsigned nof_symb_coreset
Number of symbols of the CORESET, .
Definition pdcch_type0_css_occasions.h:37
Describes a Type0-PDCCH CSS monitoring occasions for pattern 1.
Definition pdcch_type0_css_occasions.h:53
static_vector< unsigned, MAX_NOF_OCCASIONS_PER_SLOT > start_symbol
Indicates the starting symbol of the CORESET.
Definition pdcch_type0_css_occasions.h:64
static constexpr unsigned MAX_NOF_OCCASIONS_PER_SLOT
Maximum number of Type0-PDCCH CSS monitoring occasions in a single slot.
Definition pdcch_type0_css_occasions.h:55

◆ pdcp_compute_count()

constexpr uint32_t srsran::pdcp_compute_count ( uint32_t hfn,
uint32_t sn,
pdcp_sn_size sn_size )
constexpr
41{
42 return (hfn << pdcp_sn_size_to_uint(sn_size)) | sn;
43}
constexpr uint8_t pdcp_sn_size_to_uint(pdcp_sn_size sn_size)
Convert PDCP SN size from enum to unsigned integer.
Definition pdcp_config.h:57

◆ pdcp_compute_hfn()

constexpr uint32_t srsran::pdcp_compute_hfn ( uint32_t count,
pdcp_sn_size sn_size )
constexpr
36{
37 return (count >> pdcp_sn_size_to_uint(sn_size));
38}

◆ pdcp_compute_sn()

constexpr uint32_t srsran::pdcp_compute_sn ( uint32_t count,
pdcp_sn_size sn_size )
constexpr
31{
32 return count & (0xffffffffU >> (32U - pdcp_sn_size_to_uint(sn_size)));
33}

◆ pdcp_config_to_e1ap_asn1()

asn1::e1ap::pdcp_cfg_s srsran::pdcp_config_to_e1ap_asn1 ( e1ap_pdcp_config pdcp_cfg)
inline

Converts type e1ap_pdcp_config to an E1AP ASN.1 type.

Parameters
pdcp_cfgpdcp config object.
Returns
The E1AP ASN.1 object where the result of the conversion is stored.
755{
756 asn1::e1ap::pdcp_cfg_s asn1_pdcp_cfg;
757
758 // pdcp sn size dl
759 asn1_pdcp_cfg.pdcp_sn_size_dl = pdcp_sn_size_to_asn1(pdcp_cfg.pdcp_sn_size_dl);
760
761 // pdcp sn size ul
762 asn1_pdcp_cfg.pdcp_sn_size_ul = pdcp_sn_size_to_asn1(pdcp_cfg.pdcp_sn_size_ul);
763
764 // rlc mode
765 asn1_pdcp_cfg.rlc_mode = rlc_mode_to_asn1(pdcp_cfg.rlc_mod);
766
767 // rohc params
768 if (pdcp_cfg.rohc_params.has_value()) {
769 asn1_pdcp_cfg.rohc_params_present = true;
770 if (pdcp_cfg.rohc_params.value().rohc.has_value()) {
771 asn1_pdcp_cfg.rohc_params.set_rohc();
772 auto& e1ap_rohc = asn1_pdcp_cfg.rohc_params.rohc();
773 e1ap_rohc.max_c_id = pdcp_cfg.rohc_params.value().rohc.value().max_cid;
774 e1ap_rohc.rohc_profiles = pdcp_cfg.rohc_params.value().rohc.value().rohc_profiles;
775 if (pdcp_cfg.rohc_params.value().rohc.value().continue_rohc.has_value()) {
776 e1ap_rohc.continue_rohc_present = true;
777 if (pdcp_cfg.rohc_params.value().rohc.value().continue_rohc.value()) {
778 e1ap_rohc.continue_rohc = asn1::e1ap::rohc_s::continue_rohc_opts::options::true_value;
779 } else {
780 e1ap_rohc.continue_rohc = asn1::e1ap::rohc_s::continue_rohc_opts::options::nulltype;
781 }
782 }
783 } else if (pdcp_cfg.rohc_params.value().ul_only_rohc.has_value()) {
784 asn1_pdcp_cfg.rohc_params.set_ul_only_rohc();
785 auto& e1ap_rohc = asn1_pdcp_cfg.rohc_params.ul_only_rohc();
786 e1ap_rohc.max_c_id = pdcp_cfg.rohc_params.value().ul_only_rohc.value().max_cid;
787 e1ap_rohc.rohc_profiles = pdcp_cfg.rohc_params.value().ul_only_rohc.value().rohc_profiles;
788 if (pdcp_cfg.rohc_params.value().ul_only_rohc.value().continue_rohc.has_value()) {
789 e1ap_rohc.continue_rohc_present = true;
790 if (pdcp_cfg.rohc_params.value().ul_only_rohc.value().continue_rohc.value()) {
791 e1ap_rohc.continue_rohc = asn1::e1ap::ul_only_rohc_s::continue_rohc_opts::options::true_value;
792 } else {
793 e1ap_rohc.continue_rohc = asn1::e1ap::ul_only_rohc_s::continue_rohc_opts::options::nulltype;
794 }
795 }
796 } else {
797 asn1_pdcp_cfg.rohc_params_present = false;
798 }
799 }
800
801 // t reordering timer
802 if (pdcp_cfg.t_reordering_timer.has_value()) {
803 asn1_pdcp_cfg.t_reordering_timer_present = true;
804 asn1_pdcp_cfg.t_reordering_timer.t_reordering = pdcp_t_reordering_to_asn1(pdcp_cfg.t_reordering_timer.value());
805 }
806
807 // discard timer
808 if (pdcp_cfg.discard_timer.has_value()) {
809 asn1_pdcp_cfg.discard_timer_present = true;
810 asn1_pdcp_cfg.discard_timer = pdcp_discard_timer_to_asn1(pdcp_cfg.discard_timer.value());
811 }
812
813 // ul data split thres
814 if (pdcp_cfg.ul_data_split_thres.has_value()) {
815 asn1_pdcp_cfg.ul_data_split_thres_present = true;
816 asn1::number_to_enum(asn1_pdcp_cfg.ul_data_split_thres, pdcp_cfg.ul_data_split_thres.value());
817 }
818
819 // pdcp dupl
820 if (pdcp_cfg.pdcp_dupl.has_value()) {
821 asn1_pdcp_cfg.pdcp_dupl_present = true;
822 if (pdcp_cfg.pdcp_dupl.value()) {
823 asn1_pdcp_cfg.pdcp_dupl = asn1::e1ap::pdcp_dupl_opts::options::true_value;
824 } else {
825 asn1_pdcp_cfg.pdcp_dupl = asn1::e1ap::pdcp_dupl_opts::options::nulltype;
826 }
827 }
828
829 // pdcp reest
830 if (pdcp_cfg.pdcp_reest.has_value()) {
831 asn1_pdcp_cfg.pdcp_reest_present = true;
832 if (pdcp_cfg.pdcp_reest.value()) {
833 asn1_pdcp_cfg.pdcp_reest = asn1::e1ap::pdcp_reest_opts::options::true_value;
834 } else {
835 asn1_pdcp_cfg.pdcp_reest = asn1::e1ap::pdcp_reest_opts::options::nulltype;
836 }
837 }
838
839 // pdcp data recovery
840 if (pdcp_cfg.pdcp_data_recovery.has_value()) {
841 asn1_pdcp_cfg.pdcp_data_recovery_present = true;
842 if (pdcp_cfg.pdcp_data_recovery.value()) {
843 asn1_pdcp_cfg.pdcp_data_recovery = asn1::e1ap::pdcp_data_recovery_opts::options::true_value;
844 } else {
845 asn1_pdcp_cfg.pdcp_data_recovery = asn1::e1ap::pdcp_data_recovery_opts::options::nulltype;
846 }
847 }
848
849 // dupl activation
850 if (pdcp_cfg.dupl_activation.has_value()) {
851 asn1_pdcp_cfg.dupl_activation_present = true;
852 asn1::string_to_enum(asn1_pdcp_cfg.dupl_activation, pdcp_cfg.dupl_activation.value());
853 }
854
855 // out of orfder delivery
856 if (pdcp_cfg.out_of_order_delivery.has_value()) {
857 asn1_pdcp_cfg.out_of_order_delivery_present = true;
858 if (pdcp_cfg.out_of_order_delivery.value()) {
859 asn1_pdcp_cfg.out_of_order_delivery = asn1::e1ap::out_of_order_delivery_opts::options::true_value;
860 } else {
861 asn1_pdcp_cfg.out_of_order_delivery = asn1::e1ap::out_of_order_delivery_opts::options::nulltype;
862 }
863 }
864
865 return asn1_pdcp_cfg;
866}
asn1::e1ap::pdcp_sn_size_e pdcp_sn_size_to_asn1(pdcp_sn_size sn_size)
Convert PDCP SN size from enum to E1AP ASN.1.
Definition e1ap_asn1_converters.h:348
asn1::e1ap::discard_timer_e pdcp_discard_timer_to_asn1(pdcp_discard_timer discard_timer)
Converts pdcp_discard_timer type to E1AP ASN.1 discard timer type.
Definition e1ap_asn1_converters.h:446
asn1::e1ap::rlc_mode_e rlc_mode_to_asn1(srsran::pdcp_rlc_mode rlc_mod)
Converts rlc_mode type to an E1AP ASN.1 type.
Definition e1ap_asn1_converters.h:305
Definition e1ap_ies.h:2503
Definition e1ap_types.h:135

◆ pdcp_control_pdu_get_cpt()

constexpr pdcp_control_pdu_type srsran::pdcp_control_pdu_get_cpt ( uint8_t first_byte)
constexpr

Reads the CPT field from the first (header) byte of a PDCP control PDU.

Parameters
first_byteFirst byte of the PDU (passed by value)
Returns
Value of the CPT field
75{
76 return static_cast<pdcp_control_pdu_type>((first_byte >> 4U) & 0x07U);
77}
pdcp_control_pdu_type
Definition pdcp_pdu.h:61

◆ pdcp_data_pdu_header_size()

constexpr size_t srsran::pdcp_data_pdu_header_size ( pdcp_sn_size sn_size)
constexpr
40{
41 switch (sn_size) {
42 case pdcp_sn_size::size12bits:
43 return pdcp_data_pdu_header_size_12bit;
44 case pdcp_sn_size::size18bits:
45 return pdcp_data_pdu_header_size_18bit;
46 }
47 srsran_assertion_failure("Cannot determine PDCP data PDU header size: unsupported sn_size={}",
48 pdcp_sn_size_to_uint(sn_size));
49 return pdcp_data_pdu_header_size_12bit;
50}

◆ pdcp_discard_timer_from_int()

bool srsran::pdcp_discard_timer_from_int ( pdcp_discard_timer & discard_timer,
int num )
inline
108{
109 switch (num) {
110 case 10:
111 case 20:
112 case 30:
113 case 40:
114 case 50:
115 case 60:
116 case 75:
117 case 100:
118 case 150:
119 case 200:
120 case 250:
121 case 300:
122 case 500:
123 case 750:
124 case 1500:
125 case -1:
126 discard_timer = static_cast<pdcp_discard_timer>(num);
127 return true;
128 default:
129 return false;
130 }
131}

◆ pdcp_discard_timer_to_asn1()

asn1::e1ap::discard_timer_e srsran::pdcp_discard_timer_to_asn1 ( pdcp_discard_timer discard_timer)
inline

Converts pdcp_discard_timer type to E1AP ASN.1 discard timer type.

447{
448 asn1::e1ap::discard_timer_e asn1_discard_timer = {};
449
450 switch (discard_timer) {
451 case pdcp_discard_timer::ms10:
452 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms10;
453 break;
454 case pdcp_discard_timer::ms20:
455 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms20;
456 break;
457 case pdcp_discard_timer::ms30:
458 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms30;
459 break;
460 case pdcp_discard_timer::ms40:
461 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms40;
462 break;
463 case pdcp_discard_timer::ms50:
464 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms50;
465 break;
466 case pdcp_discard_timer::ms60:
467 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms60;
468 break;
469 case pdcp_discard_timer::ms75:
470 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms75;
471 break;
472 case pdcp_discard_timer::ms100:
473 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms100;
474 break;
475 case pdcp_discard_timer::ms150:
476 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms150;
477 break;
478 case pdcp_discard_timer::ms200:
479 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms200;
480 break;
481 case pdcp_discard_timer::ms250:
482 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms250;
483 break;
484 case pdcp_discard_timer::ms300:
485 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms300;
486 break;
487 case pdcp_discard_timer::ms500:
488 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms500;
489 break;
490 case pdcp_discard_timer::ms750:
491 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms750;
492 break;
493 case pdcp_discard_timer::ms1500:
494 asn1_discard_timer = asn1::e1ap::discard_timer_opts::ms1500;
495 break;
496 case pdcp_discard_timer::infinity:
497 asn1_discard_timer = asn1::e1ap::discard_timer_opts::infinity;
498 break;
499 default:
500 srsran_assert(false, "Unsupported PDCP discard timer. PDCP discard timer={}", discard_timer);
501 }
502
503 return asn1_discard_timer;
504}

◆ pdcp_discard_timer_to_int()

constexpr int16_t srsran::pdcp_discard_timer_to_int ( pdcp_discard_timer discard_timer)
constexpr

Convert PDCP NR discard timer from enum to integer.

135{
136 return static_cast<int16_t>(discard_timer);
137}

◆ pdcp_make_default_srb_config()

pdcp_config srsran::pdcp_make_default_srb_config ( )
inline

Make default SRB parameters for PDCP Ref: 3GPP TS 38.331, section 9.2.1.

259{
260 pdcp_config config = {};
261 // common TX/RX parameters
262 config.rb_type = pdcp_rb_type::srb;
263 config.rlc_mode = pdcp_rlc_mode::am;
264 config.integrity_protection_required = true;
265 config.ciphering_required = true;
266
267 // Tx config
268 config.tx.sn_size = pdcp_sn_size::size12bits;
269 config.tx.direction = pdcp_security_direction::downlink;
270 config.tx.status_report_required = false;
271
272 // Rx config
273 config.rx.sn_size = pdcp_sn_size::size12bits;
274 config.rx.direction = pdcp_security_direction::uplink;
275 config.rx.out_of_order_delivery = false;
276 config.rx.t_reordering = pdcp_t_reordering::infinity;
277
278 // Custom config
279 config.custom = {};
280 config.custom.tx.rlc_sdu_queue = 512;
281
282 return config;
283}

◆ pdcp_pdu_get_dc()

constexpr pdcp_dc_field srsran::pdcp_pdu_get_dc ( uint8_t first_byte)
constexpr

Reads the D/C field from the first (header) byte of a PDCP PDU.

Parameters
first_byteFirst byte of the PDU (passed by value)
Returns
Value of the D/C field
55{
56 return static_cast<pdcp_dc_field>((first_byte >> 7U) & 0x01U);
57}
pdcp_dc_field
Definition pdcp_pdu.h:42

◆ pdcp_sn_cardinality()

constexpr uint32_t srsran::pdcp_sn_cardinality ( pdcp_sn_size sn_size)
constexpr
46{
47 uint16_t sn_size_num = pdcp_sn_size_to_uint(sn_size);
48 srsran_assert(sn_size_num < 32, "Cardinality of sn_size={} exceeds return type 'uint32_t'", sn_size_num);
49 return (1 << sn_size_num);
50}

◆ pdcp_sn_size_from_uint()

bool srsran::pdcp_sn_size_from_uint ( pdcp_sn_size & sn_size,
uint16_t num )
inline
44{
45 if (num == 12) {
46 sn_size = pdcp_sn_size::size12bits;
47 return true;
48 }
49 if (num == 18) {
50 sn_size = pdcp_sn_size::size18bits;
51 return true;
52 }
53 return false;
54}

◆ pdcp_sn_size_to_asn1()

asn1::e1ap::pdcp_sn_size_e srsran::pdcp_sn_size_to_asn1 ( pdcp_sn_size sn_size)
inline

Convert PDCP SN size from enum to E1AP ASN.1.

349{
350 asn1::e1ap::pdcp_sn_size_e asn1_sn_size = {};
351
352 switch (sn_size) {
353 case pdcp_sn_size::size12bits:
354 asn1_sn_size = asn1::e1ap::pdcp_sn_size_e::s_neg12;
355 break;
356 case pdcp_sn_size::size18bits:
357 asn1_sn_size = asn1::e1ap::pdcp_sn_size_e::s_neg18;
358 break;
359 default:
360 srsran_assert(false, "Unsupported PDCP SN size. PDCP SN size={}", sn_size);
361 }
362
363 return asn1_sn_size;
364}

◆ pdcp_sn_size_to_uint()

constexpr uint8_t srsran::pdcp_sn_size_to_uint ( pdcp_sn_size sn_size)
constexpr

Convert PDCP SN size from enum to unsigned integer.

58{
59 return static_cast<uint8_t>(sn_size);
60}

◆ pdcp_t_reordering_from_int()

bool srsran::pdcp_t_reordering_from_int ( pdcp_t_reordering & t_reord,
int num )
inline

Conversion of t-Reordering from integer to enum.

74{
75 switch (num) {
76 case 0:
77 case 1:
78 case 2:
79 case 4:
80 case 5:
81 case 8:
82 case 10:
83 case 15:
84 case 20:
85 case 30:
86 case 40:
87 case 50:
88 case 60:
89 case 80:
90 case 100:
91 case 120:
92 case 140:
93 case 160:
94 case 180:
95 case 200:
96 case 220:
97 case 240:
98 case 260:
99 case 280:
100 case 300:
101 case 500:
102 case 750:
103 case 1000:
104 case 1250:
105 case 1500:
106 case 1750:
107 case 2000:
108 case 2250:
109 case 2500:
110 case 2750:
111 case 3000:
112 case -1:
113 t_reord = static_cast<pdcp_t_reordering>(num);
114 return true;
115 default:
116 return false;
117 }
118}

◆ pdcp_t_reordering_to_asn1()

asn1::e1ap::t_reordering_e srsran::pdcp_t_reordering_to_asn1 ( pdcp_t_reordering t_reordering)
inline
629{
630 asn1::e1ap::t_reordering_e asn1_t_reordering = {};
631
632 switch (t_reordering) {
633 case pdcp_t_reordering::ms0:
634 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms0;
635 break;
636 case pdcp_t_reordering::ms1:
637 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms1;
638 break;
639 case pdcp_t_reordering::ms2:
640 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms2;
641 break;
642 case pdcp_t_reordering::ms4:
643 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms4;
644 break;
645 case pdcp_t_reordering::ms5:
646 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms5;
647 break;
648 case pdcp_t_reordering::ms8:
649 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms8;
650 break;
651 case pdcp_t_reordering::ms10:
652 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms10;
653 break;
654 case pdcp_t_reordering::ms15:
655 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms15;
656 break;
657 case pdcp_t_reordering::ms20:
658 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms20;
659 break;
660 case pdcp_t_reordering::ms30:
661 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms30;
662 break;
663 case pdcp_t_reordering::ms40:
664 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms40;
665 break;
666 case pdcp_t_reordering::ms50:
667 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms50;
668 break;
669 case pdcp_t_reordering::ms60:
670 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms60;
671 break;
672 case pdcp_t_reordering::ms80:
673 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms80;
674 break;
675 case pdcp_t_reordering::ms100:
676 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms100;
677 break;
678 case pdcp_t_reordering::ms120:
679 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms120;
680 break;
681 case pdcp_t_reordering::ms140:
682 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms140;
683 break;
684 case pdcp_t_reordering::ms160:
685 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms160;
686 break;
687 case pdcp_t_reordering::ms180:
688 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms180;
689 break;
690 case pdcp_t_reordering::ms200:
691 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms200;
692 break;
693 case pdcp_t_reordering::ms220:
694 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms220;
695 break;
696 case pdcp_t_reordering::ms240:
697 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms240;
698 break;
699 case pdcp_t_reordering::ms260:
700 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms260;
701 break;
702 case pdcp_t_reordering::ms280:
703 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms280;
704 break;
705 case pdcp_t_reordering::ms300:
706 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms300;
707 break;
708 case pdcp_t_reordering::ms500:
709 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms500;
710 break;
711 case pdcp_t_reordering::ms750:
712 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms750;
713 break;
714 case pdcp_t_reordering::ms1000:
715 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms1000;
716 break;
717 case pdcp_t_reordering::ms1250:
718 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms1250;
719 break;
720 case pdcp_t_reordering::ms1500:
721 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms1500;
722 break;
723 case pdcp_t_reordering::ms1750:
724 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms1750;
725 break;
726 case pdcp_t_reordering::ms2000:
727 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms2000;
728 break;
729 case pdcp_t_reordering::ms2250:
730 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms2250;
731 break;
732 case pdcp_t_reordering::ms2500:
733 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms2500;
734 break;
735 case pdcp_t_reordering::ms2750:
736 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms2750;
737 break;
738 case pdcp_t_reordering::ms3000:
739 asn1_t_reordering = asn1::e1ap::t_reordering_e::ms3000;
740 break;
741 case pdcp_t_reordering::infinity:
742 asn1_t_reordering = asn1::e1ap::t_reordering_e::nulltype;
743 break;
744 default:
745 srsran_assert(false, "Unsupported PDCP t-reordering timer. PDCP t-reordering timer={}", t_reordering);
746 }
747
748 return asn1_t_reordering;
749}

◆ pdcp_t_reordering_to_int()

constexpr int16_t srsran::pdcp_t_reordering_to_int ( pdcp_t_reordering t_reordering)
constexpr

Convert PDCP NR t-Reordering from enum to integer.

122{
123 return static_cast<int16_t>(t_reordering);
124}

◆ pdcp_window_size() [1/2]

constexpr uint32_t srsran::pdcp_window_size ( pdcp_sn_size sn_size)
constexpr
56{
57 switch (sn_size) {
58 case pdcp_sn_size::size12bits:
59 return pdcp_window_size_12bit;
60 case pdcp_sn_size::size18bits:
61 return pdcp_window_size_18bit;
62 }
63 srsran_assertion_failure("Cannot determine PDCP window size: unsupported sn_size={}", pdcp_sn_size_to_uint(sn_size));
64 return pdcp_window_size_12bit;
65}

◆ pdcp_window_size() [2/2]

constexpr uint32_t srsran::pdcp_window_size ( uint16_t sn_size)
constexpr

Returns the PDCP window size.

Parameters
sn_sizeLength of the sequence number field in bits
Returns
size of the window
75{
76 return pcdp_sn_cardinality(sn_size - 1);
77}
constexpr uint32_t pcdp_sn_cardinality(uint16_t sn_size)
Returns the value range of the sequence numbers.
Definition pdcp_config.h:65

◆ pdsch_default_time_allocation_default_A_get()

pdsch_default_time_allocation_config srsran::pdsch_default_time_allocation_default_A_get ( cyclic_prefix cp,
unsigned row_index,
dmrs_typeA_position dmrs_pos )

Determines the default PDSCH time-domain resource allocation A.

The time domain allocation configuration is described in TS38.214 Table 5.1.2.1.1-2 for normal cyclic prefix and TS38.214 Table 5.1.2.1.1-3 for extended cyclic prefix.

Parameters
[in]cpCyclic prefix.
[in]row_indexRow index.
[in]dmrs_posDM-RS for mapping Type A position.
Returns
A valid PDSCH time-domain allocation configuration is the provided parameters are valid. Otherwise, PDSCH_DEFAULT_TIME_ALLOCATION_RESERVED.
110{
111 switch (cp) {
113 return pdsch_default_time_allocation_default_A_get_normal(row_index, dmrs_pos);
115 default:
116 return pdsch_default_time_allocation_default_A_get_extended(row_index, dmrs_pos);
117 }
118}
@ EXTENDED
Indicates extended cyclic prefix length.
Definition cyclic_prefix.h:43

◆ pdsch_default_time_allocations_default_A_table()

span< const pdsch_time_domain_resource_allocation > srsran::pdsch_default_time_allocations_default_A_table ( cyclic_prefix cp,
dmrs_typeA_position dmrs_pos )

Determines the table of default PDSCH time-domain resource allocation A.

Parameters
[in]cpCyclic prefix.
[in]dmrs_posDM-RS for mapping Type A position.
Returns
A list of valid PDSCH time-domain allocation configurations to choose from.
122{
123 // TS38.214 Table 5.1.2.1.1-2.
124 static constexpr size_t PDSCH_TD_RES_ALLOC_TABLE_SIZE = 16;
125
126 // Build PDSCH-TimeDomain tables statically.
128 std::array<pdsch_time_domain_resource_allocation, PDSCH_TD_RES_ALLOC_TABLE_SIZE> table;
129 for (unsigned i = 0; i < PDSCH_TD_RES_ALLOC_TABLE_SIZE; ++i) {
131 table[i].k0 = cfg.pdcch_to_pdsch_delay;
132 table[i].map_type = cfg.mapping_type;
133 table[i].symbols = {cfg.start_symbol, cfg.start_symbol + cfg.duration};
134 }
135 return table;
136 };
137 static const std::array<std::array<pdsch_time_domain_resource_allocation, PDSCH_TD_RES_ALLOC_TABLE_SIZE>, 4> tables =
138 {table_builder(cyclic_prefix::NORMAL, dmrs_typeA_position::pos2),
139 table_builder(cyclic_prefix::NORMAL, dmrs_typeA_position::pos3),
140 table_builder(cyclic_prefix::EXTENDED, dmrs_typeA_position::pos2),
141 table_builder(cyclic_prefix::EXTENDED, dmrs_typeA_position::pos3)};
142
143 // Retrieve respective table.
144 return tables[static_cast<unsigned>(cp.value) * 2 + (static_cast<unsigned>(dmrs_pos) - 2)];
145}
Describes a cyclic prefix configuration with its helper methods.
Definition cyclic_prefix.h:36
options value
Indicates the cyclic prefix type.
Definition cyclic_prefix.h:47
dmrs_typeA_position
Position of first DM-RS for Downlink (see TS 38.211, clause 7.4.1.1.1) and Uplink (see TS 38....
Definition dmrs.h:29
pdsch_default_time_allocation_config pdsch_default_time_allocation_default_A_get(cyclic_prefix cp, unsigned row_index, dmrs_typeA_position dmrs_pos)
Determines the default PDSCH time-domain resource allocation A.
Definition pdsch_default_time_allocation.cpp:109
Collects the PDSCH default time-domain allocation parameters.
Definition pdsch_default_time_allocation.h:37
uint8_t duration
Transmission duration in symbols, parameter . The range is {2, ..., 12}.
Definition pdsch_default_time_allocation.h:45
uint8_t start_symbol
Start symbol index within the slot, parameter . The range is {0, ..., 10}.
Definition pdsch_default_time_allocation.h:43
sch_mapping_type mapping_type
PDSCH mapping.
Definition pdsch_default_time_allocation.h:39
uint8_t pdcch_to_pdsch_delay
PDCCH to PDSCH delay in slots, parameter . The range is {0, 1}.
Definition pdsch_default_time_allocation.h:41

◆ pdsch_dmrs_symbol_mask_mapping_type_A_single_get()

dmrs_symbol_mask srsran::pdsch_dmrs_symbol_mask_mapping_type_A_single_get ( const pdsch_dmrs_symbol_mask_mapping_type_A_single_configuration & config)

Calculates the DMRS for PDSCH symbol mask for single duration.

It is implemented as per TS38.211 Table 5.1.2.1.1-2.

Any configuration that is not covered in the table triggers an assertion.

29{
30 unsigned l0 = static_cast<unsigned>(config.typeA_pos);
31 unsigned l1 =
32 (config.lte_crs_match_around && (config.additional_position == dmrs_additional_positions::pos1 && l0 == 3) &&
34 ? 12
35 : 11;
36
38 mask.set(l0);
39
40 if (config.last_symbol < 8 || config.additional_position == dmrs_additional_positions::pos0) {
41 return mask;
42 }
43
44 if (config.last_symbol < 10) {
45 mask.set(7);
46 return mask;
47 }
48
49 if (config.additional_position == dmrs_additional_positions::pos1) {
50 if (config.last_symbol < 13) {
51 mask.set(9);
52 return mask;
53 }
54 mask.set(l1);
55 return mask;
56 }
57
58 if (config.additional_position == dmrs_additional_positions::pos2) {
59 if (config.last_symbol < 13) {
60 mask.set(6);
61 mask.set(9);
62 return mask;
63 }
64
65 mask.set(7);
66 mask.set(11);
67 return mask;
68 }
69
70 if (config.last_symbol < 12) {
71 mask.set(6);
72 mask.set(9);
73 return mask;
74 }
75
76 mask.set(5);
77 mask.set(8);
78 mask.set(11);
79
80 return mask;
81}
bounded_integer< uint8_t, 3, 14 > last_symbol
Last OFDM symbol scheduled for PDSCH.
Definition pdsch_dmrs_symbol_mask.h:47
dmrs_typeA_position typeA_pos
Indicates the first OFDM symbol within the slot carrying DMRS.
Definition pdsch_dmrs_symbol_mask.h:35
bool lte_crs_match_around
Indicates the higher layer parameter lte-CRS-ToMatchAround is configured.
Definition pdsch_dmrs_symbol_mask.h:49
bool ue_capable_additional_dmrs_dl_alt
Indicates the UE has indicated it is capable of additionalDMRS-DL-Alt.
Definition pdsch_dmrs_symbol_mask.h:51
dmrs_additional_positions additional_position
Indicates the number of additional DMRS positions in time domain.
Definition pdsch_dmrs_symbol_mask.h:39

◆ pdsch_mcs_get_config()

sch_mcs_description srsran::pdsch_mcs_get_config ( pdsch_mcs_table table,
sch_mcs_index index )

Gets the Modulation and Coding Scheme configuration for PDSCH.

Reserved target code rates and spectral efficiencies are indicated with zero.

Parameters
[in]tableMCS table.
[in]indexMCS index.
Returns
Modulation and Coding Scheme parameters.
29{
30 // TS38.214 Table 5.1.3.1-1.
31 static constexpr std::array<sch_mcs_description, 32> MCS_INDEX_TABLE_1 = {
32 {{modulation_scheme::QPSK, 120.0F}, {modulation_scheme::QPSK, 157.0F}, {modulation_scheme::QPSK, 193.0F},
33 {modulation_scheme::QPSK, 251.0F}, {modulation_scheme::QPSK, 308.0F}, {modulation_scheme::QPSK, 379.0F},
34 {modulation_scheme::QPSK, 449.0F}, {modulation_scheme::QPSK, 526.0F}, {modulation_scheme::QPSK, 602.0F},
35 {modulation_scheme::QPSK, 679.0F}, {modulation_scheme::QAM16, 340.0F}, {modulation_scheme::QAM16, 378.0F},
36 {modulation_scheme::QAM16, 434.0F}, {modulation_scheme::QAM16, 490.0F}, {modulation_scheme::QAM16, 553.0F},
37 {modulation_scheme::QAM16, 616.0F}, {modulation_scheme::QAM16, 658.0F}, {modulation_scheme::QAM64, 438.0F},
38 {modulation_scheme::QAM64, 466.0F}, {modulation_scheme::QAM64, 517.0F}, {modulation_scheme::QAM64, 567.0F},
39 {modulation_scheme::QAM64, 616.0F}, {modulation_scheme::QAM64, 666.0F}, {modulation_scheme::QAM64, 719.0F},
40 {modulation_scheme::QAM64, 772.0F}, {modulation_scheme::QAM64, 822.0F}, {modulation_scheme::QAM64, 873.0F},
41 {modulation_scheme::QAM64, 910.0F}, {modulation_scheme::QAM64, 948.0F}, {modulation_scheme::QPSK, 0.0F},
42 {modulation_scheme::QAM16, 0.0F}, {modulation_scheme::QAM64, 0.0F}}};
43
44 // TS38.214 Table 5.1.3.1-2.
45 static constexpr std::array<sch_mcs_description, 32> MCS_INDEX_TABLE_2 = {
46 {{modulation_scheme::QPSK, 120.0F}, {modulation_scheme::QPSK, 193.0F}, {modulation_scheme::QPSK, 308.0F},
47 {modulation_scheme::QPSK, 449.0F}, {modulation_scheme::QPSK, 602.0F}, {modulation_scheme::QAM16, 378.0F},
48 {modulation_scheme::QAM16, 434.0F}, {modulation_scheme::QAM16, 490.0F}, {modulation_scheme::QAM16, 553.0F},
49 {modulation_scheme::QAM16, 616.0F}, {modulation_scheme::QAM16, 658.0F}, {modulation_scheme::QAM64, 466.0F},
50 {modulation_scheme::QAM64, 517.0F}, {modulation_scheme::QAM64, 567.0F}, {modulation_scheme::QAM64, 616.0F},
51 {modulation_scheme::QAM64, 666.0F}, {modulation_scheme::QAM64, 719.0F}, {modulation_scheme::QAM64, 772.0F},
52 {modulation_scheme::QAM64, 822.0F}, {modulation_scheme::QAM64, 873.0F}, {modulation_scheme::QAM256, 682.5F},
53 {modulation_scheme::QAM256, 711.0F}, {modulation_scheme::QAM256, 754.0F}, {modulation_scheme::QAM256, 797.0F},
54 {modulation_scheme::QAM256, 841.0F}, {modulation_scheme::QAM256, 885.0F}, {modulation_scheme::QAM256, 916.5F},
55 {modulation_scheme::QAM256, 948.0F}, {modulation_scheme::QPSK, 0.0F}, {modulation_scheme::QAM16, 0.0F},
56 {modulation_scheme::QAM64, 0.0F}, {modulation_scheme::QAM256, 0.0F}}};
57
58 // TS38.214 Table 5.1.3.1-3.
59 static constexpr std::array<sch_mcs_description, 32> MCS_INDEX_TABLE_3 = {
60 {{modulation_scheme::QPSK, 30.0F}, {modulation_scheme::QPSK, 40.0F}, {modulation_scheme::QPSK, 50.0F},
61 {modulation_scheme::QPSK, 64.0F}, {modulation_scheme::QPSK, 78.0F}, {modulation_scheme::QPSK, 99.0F},
62 {modulation_scheme::QPSK, 120.0F}, {modulation_scheme::QPSK, 157.0F}, {modulation_scheme::QPSK, 193.0F},
63 {modulation_scheme::QPSK, 251.0F}, {modulation_scheme::QPSK, 308.0F}, {modulation_scheme::QPSK, 379.0F},
64 {modulation_scheme::QPSK, 449.0F}, {modulation_scheme::QPSK, 526.0F}, {modulation_scheme::QPSK, 602.0F},
65 {modulation_scheme::QAM16, 340.0F}, {modulation_scheme::QAM16, 378.0F}, {modulation_scheme::QAM16, 434.0F},
66 {modulation_scheme::QAM16, 490.0F}, {modulation_scheme::QAM16, 553.0F}, {modulation_scheme::QAM16, 616.0F},
67 {modulation_scheme::QAM64, 438.0F}, {modulation_scheme::QAM64, 466.0F}, {modulation_scheme::QAM64, 517.0F},
68 {modulation_scheme::QAM64, 567.0F}, {modulation_scheme::QAM64, 616.0F}, {modulation_scheme::QAM64, 666.0F},
69 {modulation_scheme::QAM64, 719.0F}, {modulation_scheme::QAM64, 772.0F}, {modulation_scheme::QPSK, 0.0F},
70 {modulation_scheme::QAM16, 0.0F}, {modulation_scheme::QAM64, 0.0F}}};
71
72 // Return the MCS configuration from the selected table.
73 switch (table_) {
74 case pdsch_mcs_table::qam64:
75 return MCS_INDEX_TABLE_1[index.to_uint()];
76 case pdsch_mcs_table::qam256:
77 return MCS_INDEX_TABLE_2[index.to_uint()];
78 case pdsch_mcs_table::qam64LowSe:
79 default:
80 return MCS_INDEX_TABLE_3[index.to_uint()];
81 }
82}

◆ pdu_session_id_to_uint()

constexpr uint16_t srsran::pdu_session_id_to_uint ( pdu_session_id_t id)
inlineconstexpr

Convert PDU Session ID type to integer.

44{
45 return static_cast<uint16_t>(id);
46}

◆ periodic_bsr_timer_to_value()

std::underlying_type< periodic_bsr_timer >::type srsran::periodic_bsr_timer_to_value ( periodic_bsr_timer timer)
inline

Return the value of periodic_bsr_timer.

67{
68 return static_cast<std::underlying_type<periodic_bsr_timer>::type>(timer);
69}

◆ ph_to_db_range()

ph_db_range srsran::ph_to_db_range ( unsigned ph)
inline

Converts PH value reported by UE to dB interval based on mapping defined in Table 10.1.17.1-1 of TS 38.133.

Parameters
[in]phPH value reported by UE. This field maps to PH in table 6.1.3.8-1 of TS 38.321.
Returns
Returns the dB interval to which reported PH maps to.
34{
35 static const int ph_min_db_value = -32;
36 static const int ph_max_db_value = 38;
37
38 if (ph == 0) {
39 // PH is < -32dB.
40 return {ph_min_db_value, ph_min_db_value};
41 }
42 if (ph == 63) {
43 // PH is >= 38dB.
44 return {ph_max_db_value, ph_max_db_value};
45 }
46 if (ph < 55) {
47 return {ph_min_db_value + ph - 1, ph_min_db_value + ph};
48 }
49 return {ph_min_db_value + ph - 1, ph_min_db_value + ph + 1};
50}

◆ phr_periodic_timer_to_value()

std::underlying_type< phr_periodic_timer >::type srsran::phr_periodic_timer_to_value ( phr_periodic_timer timer)
inline

Return the value of phr_periodic_timer.

43{
44 return static_cast<std::underlying_type<phr_periodic_timer>::type>(timer);
45}

◆ phr_prohibit_timer_to_value()

std::underlying_type< phr_prohibit_timer >::type srsran::phr_prohibit_timer_to_value ( phr_prohibit_timer timer)
inline

Return the value of phr_prohibit_timer.

61{
62 return static_cast<std::underlying_type<phr_prohibit_timer>::type>(timer);
63}

◆ phr_tx_pw_factor_change_to_value()

std::underlying_type< phr_tx_power_factor_change >::type srsran::phr_tx_pw_factor_change_to_value ( phr_tx_power_factor_change timer)
inline

Return the value of phr_prohibit_timer.

96{
97 return static_cast<std::underlying_type<phr_tx_power_factor_change>::type>(timer);
98}

◆ plmn_bcd_to_string()

std::string srsran::plmn_bcd_to_string ( uint32_t plmn)
inline
297{
298 uint16_t mcc, mnc;
299 ngap_plmn_to_mccmnc(plmn, &mcc, &mnc);
300 std::string mcc_string, mnc_string;
301 mcc_to_string(mcc, &mcc_string);
302 mnc_to_string(mnc, &mnc_string);
303 return mcc_string + mnc_string;
304}

◆ plmn_string_to_bcd()

uint32_t srsran::plmn_string_to_bcd ( const std::string & plmn)
inline
275{
276 uint32_t bcd_plmn = 0;
277 if (plmn.length() != 5 and plmn.length() != 6) {
278 return bcd_plmn;
279 }
280
281 uint16_t mcc;
282 if (string_to_mcc(plmn.substr(0, 3), &mcc) == false) {
283 return bcd_plmn;
284 }
285
286 uint16_t mnc;
287 if (string_to_mnc(plmn.substr(3), &mnc) == false) {
288 return bcd_plmn;
289 }
290
291 ngap_mccmnc_to_plmn(mcc, mnc, &bcd_plmn);
292
293 return bcd_plmn;
294}
void ngap_mccmnc_to_plmn(uint16_t mcc, uint16_t mnc, uint32_t *plmn)
Definition bcd_helpers.h:246
bool string_to_mnc(std::string str, uint16_t *mnc)
Definition bcd_helpers.h:100

◆ pow2()

constexpr unsigned srsran::pow2 ( unsigned power)
inlineconstexpr

Calculates the integer power of 2.

Parameters
[in]powerIndicates the power of 2 to calculate.
Returns
The result of the operation.
63{
64 return 1U << power;
65}
Here is the caller graph for this function:

◆ prach_configuration_get()

prach_configuration srsran::prach_configuration_get ( frequency_range fr,
duplex_mode dm,
uint8_t prach_config_index )

Gets a PRACH configuration.

Arguments are considered valid if:

  • They are consistent with the TS38.211 Tables 6.3.3.2-2, 6.3.3.2-3 and 6.3.3.2-4, and
  • the combination is implemented.

Currently, only long preamble formats for FR1 in FDD mode are implemented.

Parameters
[in]frFrequency range (see here for more information).
[in]dmDuplex mode (see here for more information).
[in]prach_config_indexPRACH configuration index with range {0, ..., 255}.
Returns
A valid PRACH configuration if the provided arguments are valid. Otherwise, PRACH_CONFIG_RESERVED.
556{
557 if ((fr == frequency_range::FR1) && (dm == duplex_mode::FDD || dm == duplex_mode::SUL)) {
558 return prach_configuration_get_fr1_paired(prach_config_index);
559 }
560
561 if ((fr == frequency_range::FR1) && (dm == duplex_mode::TDD)) {
562 return prach_configuration_get_fr1_unpaired(prach_config_index);
563 }
564
565 return PRACH_CONFIG_RESERVED;
566}

◆ prach_cyclic_shifts_get()

uint16_t srsran::prach_cyclic_shifts_get ( prach_subcarrier_spacing prach_scs,
restricted_set_config restricted_set,
unsigned zero_correlation_zone )

Calculates the number of cyclic shifts $N_{CS}$ used in the sequence generation as per TS38.211 Section 6.3.3.1.

The number of cyclic shifts $N_{CS}$ is extracted from:

  • TS38.211 Table 6.3.3.1-5 for preambles 0, 1 and 2
  • TS38.211 Table 6.3.3.1-6 for preamble 3, and
  • TS38.211 Table 6.3.3.1-7 for the remaining preambles.
Parameters
[in]prach_scsPRACH subcarrier spacing (parameter $\Delta f^{RA}$ as defined in TS38.211 Section 6.3.3.1).
[in]restricted_setRestricted set (see restrictedSetConfig in TS38.331 Section 6.3.2, Information Element RACH-ConfigCommon).
[in]zero_correlation_zoneZero correlation zone (see zeroCorrelationZoneConfig in TS38.331 Section 6.3.2, Information Element RACH-ConfigGeneric).
Returns
The number of cyclic shifts if the input parameters are valid. Otherwise, PRACH_CYCLIC_SHIFTS_RESERVED.
32{
33 // TS38.211 Table 6.3.3.1-5 First column.
34 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_1_25_UNRESTRICTED = {
35 0, 13, 15, 18, 22, 26, 32, 38, 46, 59, 76, 93, 119, 167, 279, 419};
36 // TS38.211 Table 6.3.3.1-5 Second column.
37 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_1_25_TYPE_A = {
38 15, 18, 22, 26, 32, 38, 46, 55, 68, 82, 100, 128, 158, 202, 237, PRACH_CYCLIC_SHIFTS_RESERVED};
39 // TS38.211 Table 6.3.3.1-5 Third column.
40 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_1_25_TYPE_B = {15,
41 18,
42 22,
43 26,
44 32,
45 38,
46 46,
47 55,
48 68,
49 82,
50 100,
51 118,
52 137,
53 PRACH_CYCLIC_SHIFTS_RESERVED,
54 PRACH_CYCLIC_SHIFTS_RESERVED,
55 PRACH_CYCLIC_SHIFTS_RESERVED};
56
57 // TS38.211 Table 6.3.3.1-6 First column.
58 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_5_UNRESTRICTED = {
59 0, 13, 26, 33, 38, 41, 49, 55, 64, 76, 93, 119, 139, 209, 279, 419};
60 // TS38.211 Table 6.3.3.1-6 Second column.
61 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_5_TYPE_A = {
62 36, 57, 72, 81, 89, 94, 103, 112, 121, 132, 137, 152, 173, 195, 216, 237};
63 // TS38.211 Table 6.3.3.1-6 Third column.
64 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_5_TYPE_B = {36,
65 57,
66 60,
67 63,
68 65,
69 68,
70 71,
71 77,
72 81,
73 85,
74 97,
75 109,
76 122,
77 137,
78 PRACH_CYCLIC_SHIFTS_RESERVED,
79 PRACH_CYCLIC_SHIFTS_RESERVED};
80
81 // TS38.211 Table 6.3.3.1-7 First column.
82 static const std::array<uint16_t, 16> NOF_CYCLIC_SHIFTS_OTHER_UNRESTRICTED = {
83 0, 2, 4, 6, 8, 10, 12, 13, 15, 17, 19, 23, 27, 34, 46, 69};
84
85 span<const uint16_t> table = {};
86
87 if (prach_scs == prach_subcarrier_spacing::kHz1_25) {
88 switch (restricted_set) {
89 case restricted_set_config::UNRESTRICTED:
91 break;
92 case restricted_set_config::TYPE_A:
94 break;
95 case restricted_set_config::TYPE_B:
97 break;
98 }
99 } else if (prach_scs == prach_subcarrier_spacing::kHz5) {
100 switch (restricted_set) {
101 case restricted_set_config::UNRESTRICTED:
103 break;
104 case restricted_set_config::TYPE_A:
106 break;
107 case restricted_set_config::TYPE_B:
109 break;
110 }
111 } else if (restricted_set == restricted_set_config::UNRESTRICTED) {
113 }
114
115 if (zero_correlation_zone >= table.size()) {
116 return PRACH_CYCLIC_SHIFTS_RESERVED;
117 }
118
119 return table[zero_correlation_zone];
120}

◆ prach_frequency_mapping_get()

prach_frequency_mapping_information srsran::prach_frequency_mapping_get ( prach_subcarrier_spacing prach_scs,
subcarrier_spacing pusch_scs )

Gets the PRACH frequency mapping information contained in TS38.211 Table 6.3.3.2-1.

Parameters
[in]prach_scs_HzPRACH subcarrier spacing (parameter $\Delta f_{RA}$).
[in]pusch_scs_HzPUSCH subcarrier spacing (parameter $\Delta f$).
Returns
The requested PRACH frequency mapping information if the combination of input parameters is valid, PRACH_FREQUENCY_MAPPING_INFORMATION_RESERVED otherwise.
29{
30 prach_frequency_mapping_information result = PRACH_FREQUENCY_MAPPING_INFORMATION_RESERVED;
31 switch (prach_scs) {
32 case prach_subcarrier_spacing::kHz1_25:
33 if (pusch_scs == subcarrier_spacing::kHz15) {
34 result.nof_rb_ra = 6;
35 result.k_bar = 7;
36 } else if (pusch_scs == subcarrier_spacing::kHz30) {
37 result.nof_rb_ra = 3;
38 result.k_bar = 1;
39 } else if (pusch_scs == subcarrier_spacing::kHz60) {
40 result.nof_rb_ra = 2;
41 result.k_bar = 133;
42 }
43 break;
44 case prach_subcarrier_spacing::kHz5:
45 if (pusch_scs == subcarrier_spacing::kHz15) {
46 result.nof_rb_ra = 24;
47 result.k_bar = 12;
48 } else if (pusch_scs == subcarrier_spacing::kHz30) {
49 result.nof_rb_ra = 12;
50 result.k_bar = 10;
51 } else if (pusch_scs == subcarrier_spacing::kHz60) {
52 result.nof_rb_ra = 6;
53 result.k_bar = 7;
54 }
55 break;
56 case prach_subcarrier_spacing::kHz15:
57 if (pusch_scs == subcarrier_spacing::kHz15) {
58 result.nof_rb_ra = 12;
59 result.k_bar = 2;
60 } else if (pusch_scs == subcarrier_spacing::kHz30) {
61 result.nof_rb_ra = 6;
62 result.k_bar = 2;
63 } else if (pusch_scs == subcarrier_spacing::kHz60) {
64 result.nof_rb_ra = 3;
65 result.k_bar = 2;
66 }
67 break;
68 case prach_subcarrier_spacing::kHz30:
69 if (pusch_scs == subcarrier_spacing::kHz15) {
70 result.nof_rb_ra = 24;
71 result.k_bar = 2;
72 } else if (pusch_scs == subcarrier_spacing::kHz30) {
73 result.nof_rb_ra = 12;
74 result.k_bar = 2;
75 } else if (pusch_scs == subcarrier_spacing::kHz60) {
76 result.nof_rb_ra = 6;
77 result.k_bar = 2;
78 }
79 break;
80 case prach_subcarrier_spacing::kHz60:
81 if (pusch_scs == subcarrier_spacing::kHz60) {
82 result.nof_rb_ra = 12;
83 result.k_bar = 2;
84 } else if (pusch_scs == subcarrier_spacing::kHz120) {
85 result.nof_rb_ra = 6;
86 result.k_bar = 2;
87 }
88 break;
89 case prach_subcarrier_spacing::kHz120:
90 if (pusch_scs == subcarrier_spacing::kHz60) {
91 result.nof_rb_ra = 24;
92 result.k_bar = 2;
93 } else if (pusch_scs == subcarrier_spacing::kHz120) {
94 result.nof_rb_ra = 12;
95 result.k_bar = 2;
96 }
97 break;
98 case prach_subcarrier_spacing::invalid:
99 // Ignore.
100 break;
101 }
102
103 return result;
104}
Collects PRACH frequency mapping information as per TS38.211 Section 5.3.2 and Section 6....
Definition prach_frequency_mapping.h:31

◆ prb_to_crb() [1/4]

crb_interval srsran::prb_to_crb ( const bwp_configuration & bwp_cfg,
prb_interval prbs )
inline

Convert PRBs within a BWP into Common RBs, which use pointA as reference point. CRBs and PRBs are assumed to have the same numerology of the provided BWP configuration.

Parameters
bwp_cfgBWP configuration of the respective PRB interval.
prbsPRBs to be converted to CRBs.
Returns
Calculated CRB interval.
52{
53 return {prb_to_crb(bwp_cfg, prbs.start()), prb_to_crb(bwp_cfg, prbs.stop())};
54}
unsigned prb_to_crb(crb_interval bwp_crb_lims, unsigned prb)
Convert a PRB into CRB given the BWP CRB limits. The CRB and PRB are assumed to use the same numerolo...
Definition rb_interval.h:69

◆ prb_to_crb() [2/4]

unsigned srsran::prb_to_crb ( const bwp_configuration & bwp_cfg,
unsigned prb )
inline

Convert PRB within a BWP into a Common RB, which use pointA as reference point. The CRB and PRB are assumed to have the same numerology of the provided BWP configuration. The existence of a CORESET#0 may also affect the rules for CRB<->PRB conversion.

Parameters
bwp_cfgBWP configuration of the respective PRB.
prbPRB to be converted to CRB.
Returns
Calculated CRB.
41{
42 srsran_sanity_check(prb <= bwp_cfg.crbs.length(), "PRB={} falls outside BWP limits={}", prb, bwp_cfg.crbs);
43 return prb + bwp_cfg.crbs.start();
44}

◆ prb_to_crb() [3/4]

crb_interval srsran::prb_to_crb ( crb_interval bwp_crb_lims,
prb_interval prbs )
inline

Convert an interval of PRBs to an interval of CRBs, given the BWP CRB limits.

77{
78 return crb_interval{prb_to_crb(bwp_crb_lims, prbs.start()), prb_to_crb(bwp_crb_lims, prbs.stop())};
79}

◆ prb_to_crb() [4/4]

unsigned srsran::prb_to_crb ( crb_interval bwp_crb_lims,
unsigned prb )
inline

Convert a PRB into CRB given the BWP CRB limits. The CRB and PRB are assumed to use the same numerology as reference.

Parameters
bwp_crb_limsBWP CRB limits set based on the active BWP configuration.
crbCRB to be converted to PRB.
Returns
Calculated PRB.
70{
71 srsran_sanity_check(prb <= bwp_crb_lims.length(), "PRB={} exceeds BWP width={}", prb, bwp_crb_lims.length());
72 return prb + bwp_crb_lims.start();
73}

◆ precompute_type0_pdcch_css_n0()

slot_point srsran::precompute_type0_pdcch_css_n0 ( uint8_t searchspace0,
uint8_t coreset0,
const cell_configuration & cell_cfg,
subcarrier_spacing scs_common,
unsigned ssb_index )

Computes the Type0-PDCCH CSS n0 slot for each beam [TS 38.213, Section 13].

Parameters
[in]searchspace0Search Space Zero index.
[in]coreset0CORESET 0 index.
[in]cell_cfgCell configuration.
[in]scs_commonSCS corresponding to subCarrierSpacingCommon, which must coincide with SCS if initial DL BWP.
[in]ssb_indexSSB Beam index.
Returns
Returns slot n0 where UE should monitor Type0-PDCCH CSS.
32{
35 cell_cfg.ssb_cfg.scs,
36 scs_common,
37 coreset0,
38 static_cast<uint8_t>(cell_cfg.ssb_cfg.k_ssb.to_uint()));
39
40 srsran_assert(coreset0_param.pattern == ssb_coreset0_mplex_pattern::mplx_pattern1,
41 "SS/PBCH and CORESET multiplexing pattern not supported.");
42
43 // Get Coreset0 num of symbols from Coreset0 config.
44 const unsigned nof_symb_coreset0 = coreset0_param.nof_rb_coreset;
45
46 srsran_assert(band_helper::get_freq_range(cell_cfg.dl_carrier.band) == frequency_range::FR1,
47 "Only bands in FR1 supported.");
48
51 .is_fr2 = false, .ss_zero_index = searchspace0, .nof_symb_coreset = nof_symb_coreset0});
52
53 const auto pdcch_slot = get_type0_pdcch_css_n0(
54 static_cast<unsigned>(ss0_config_occasion_param.offset), ss0_config_occasion_param.M, scs_common, ssb_index);
55
56 report_fatal_error_if_not(cell_cfg.is_dl_enabled(pdcch_slot), "PDCCH slot is not DL enabled.");
57
58 return pdcch_slot;
59}
pdcch_type0_css_occasion_pattern1_description pdcch_type0_css_occasions_get_pattern1(const pdcch_type0_css_occasion_pattern1_configuration &config)
Get Type0-PDCCH CSS occasions for multiplexing pattern 1 as per TS38.213 Section 13.
Definition pdcch_type0_css_occasions.cpp:28
slot_point get_type0_pdcch_css_n0(double table_13_11_and_13_12_O, double table_13_11_and_13_12_M, subcarrier_spacing scs_common, unsigned ssb_index)
Helper function that returns slot n0 (where UE should monitor Type0-PDCCH CSS) for a given SSB (beam)...
Definition pdcch_type0_css_occasions.cpp:107
pdcch_type0_css_coreset_description pdcch_type0_css_coreset_get(nr_band band, subcarrier_spacing ssb_scs, subcarrier_spacing pdcch_scs, uint8_t coreset_zero_index, uint8_t subcarrier_offset)
Get the CORESET configuration for Type0-PDCCH CSS.
Definition pdcch_type0_css_coreset_config.cpp:30
nr_band band
NR operating band< >, as per Table 5.2-1 and 5.2-2. TS 38.104.
Definition carrier_configuration.h:38
Describes a Type0-PDCCH CSS monitoring occasion configuration parameters for pattern 1.
Definition pdcch_type0_css_occasions.h:31
ssb_subcarrier_offset k_ssb
k_ssb or SSB SubcarrierOffest, as per TS38.211 Section 7.4.3.1. Possible values: {0,...
Definition ssb_configuration.h:47
subcarrier_spacing scs
SSB subcarrier spacing.
Definition ssb_configuration.h:40

◆ precompute_type0_pdcch_css_n0_plus_1()

slot_point srsran::precompute_type0_pdcch_css_n0_plus_1 ( uint8_t searchspace0,
uint8_t coreset0,
const cell_configuration & cell_cfg,
subcarrier_spacing scs_common,
unsigned ssb_index )

Computes the Type0-PDCCH CSS n0 + 1 slot for each beam [TS 38.213, Section 13].

Parameters
[in]searchspace0Search Space Zero index.
[in]coreset0CORESET 0 index.
[in]cell_cfgCell configuration.
[in]scs_commonSCS corresponding to subCarrierSpacingCommon, which must coincide with SCS if initial DL BWP.
[in]ssb_indexSSB Beam index.
Returns
Returns slot n0 + 1 where UE should monitor Type0-PDCCH CSS.
66{
67 const auto pdcch_slot = precompute_type0_pdcch_css_n0(searchspace0, coreset0, cell_cfg, scs_common, ssb_index) + 1;
68 report_fatal_error_if_not(cell_cfg.is_dl_enabled(pdcch_slot), "PDCCH slot is not DL enabled.");
69 return pdcch_slot;
70}
slot_point precompute_type0_pdcch_css_n0(uint8_t searchspace0, uint8_t coreset0, const cell_configuration &cell_cfg, subcarrier_spacing scs_common, unsigned ssb_index)
Computes the Type0-PDCCH CSS n0 slot for each beam [TS 38.213, Section 13].
Definition pdcch_type0_helpers.cpp:27

◆ prime_greater_than()

unsigned srsran::prime_greater_than ( unsigned n)

Finds the smallest prime number greater than n.

Remarks
Only works for prime numbers not larger than 3299.
60{
61 for (unsigned prime : prime_numbers) {
62 if (prime > n) {
63 return prime;
64 }
65 }
66
67 srsran_terminate("n={} exceeds the maximum prime.", n);
68}

◆ prime_lower_than()

unsigned srsran::prime_lower_than ( unsigned n)

Finds the biggest prime number less than n.

Remarks
Only works for prime numbers not larger than 3299.
71{
72 srsran_assert(n < prime_numbers[NOF_PRIME_NUMBERS - 1], "n={} exceeds the maximum prime.", n);
73
74 for (uint32_t i = NOF_PRIME_NUMBERS - 1; i > 0; i--) {
75 if (prime_numbers[i] < n) {
76 return prime_numbers[i];
77 }
78 }
79
80 return 2;
81}

◆ print()

template<typename T >
bool srsran::print ( const char * filename,
span< const T > data,
std::ios_base::openmode mode = std::ios_base::binary | std::ios_base::out )
inline

Writes the given span into a file in binary format.

The file is opened in truncated mode and writen in binary format by default.

Template Parameters
TType of the data to write.
Parameters
[in]filenameOutput file name (possibly, with path).
[in]dataData to write.
[in]modeOpen mode for the file.
Returns
True on success, false otherwise.
Warning
T must be standard layout.
44{
45 static_assert(std::is_standard_layout<T>::value, "T is not standard layout");
46 std::ofstream file(filename, mode);
47
48 if (!file.is_open()) {
49 return false;
50 }
51
52 // Write in binary format.
53 if (mode & std::ios_base::binary) {
54 file.write(reinterpret_cast<const char*>(data.data()), data.size() * sizeof(T));
55 return true;
56 }
57
58 // Write in text format.
59 for (const auto& d : data) {
60 file << d << "\n";
61 }
62
63 return true;
64}

◆ print_available_radio_factories()

void srsran::print_available_radio_factories ( )

Helper function to print all statically linked available radio factories to stdout.

56{
58 return;
59 }
60
61 // Print available factories.
62 fmt::print("Available radio types: ");
63 for (unsigned i = 0, e = radio_factory_available_factories.size(); i != e; ++i) {
64 if (i > 0) {
65 if (i == radio_factory_available_factories.size() - 1) {
66 fmt::print(" and ");
67 } else {
68 fmt::print(", ");
69 }
70 }
71 fmt::print("{}", radio_factory_available_factories[i].name);
72 }
73 fmt::print(".\n");
74}

◆ print_this_thread_priority()

void srsran::print_this_thread_priority ( )

Print caller thread priority.

262{
263 return print_thread_priority(pthread_self(), this_thread_name(), std::this_thread::get_id());
264}
const char * this_thread_name()
Get caller thread name.
Definition unique_thread.cpp:254

◆ psup_pdu_type_to_uint()

constexpr uint8_t srsran::psup_pdu_type_to_uint ( psup_pdu_type pdu_type)
inlineconstexpr

Convert PSUP PDU Type to integer.

38{
39 return static_cast<uint8_t>(pdu_type);
40}

◆ psup_ppi_to_uint()

constexpr uint8_t srsran::psup_ppi_to_uint ( psup_ppi ppi)
inlineconstexpr

Convert PSUP Paging Policy Indicator to integer.

58{
59 return static_cast<uint8_t>(ppi);
60}

◆ pucch_format2_code_rate()

float srsran::pucch_format2_code_rate ( unsigned nof_prb,
unsigned nof_symbols,
unsigned nof_payload_bits )
inline

Calculates the effective code rate for a PUCCH Format 2 transmission, for CSI of 1 part only.

Parameters
[in]nof_prbTransmission bandwidth in PRB.
[in]nof_symbolsTransmission duration in symbols.
[in]nof_payload_bitsTotal number of payload bits.
Returns
The effective code rate of the PUCCH Format 2 transmission.
43{
44 // As per Table 6.3.1.4.1-1, TS 38.212, for UCI of transmissions of CSI of one part only,
45 // \f$E_{UCI}\f$ = \f$E_{tot}\f$.
46 // TODO: replace this with a function that returns the e_uci for the general case.
47 const unsigned e_uci = get_pucch_format2_E_total(nof_prb, nof_symbols);
48
49 // As per Sections 6.3.1.2.1 and 6.3.1.4.1, TS 38.212, the parameter \f$E\f$ used to derive the number of
50 // code-blocks is \f$E_{UCI}\f$.
51 const unsigned payload_plus_crc_bits = nof_payload_bits + get_uci_nof_crc_bits(nof_payload_bits, e_uci);
52
53 // PUCCH format 2 channel bits are modulated as QPSK and mapped to two of every three resource elements.
54 const unsigned nof_channel_bits = (nof_prb * pucch_constants::FORMAT2_NOF_DATA_SC * nof_symbols * 2);
55
56 // Calculate code rate.
57 return static_cast<float>(payload_plus_crc_bits) / static_cast<float>(nof_channel_bits);
58}
constexpr unsigned get_uci_nof_crc_bits(unsigned message_length, unsigned codeword_length)
Gets the total number of CRC bits appended in a UCI message, considering segmentation.
Definition uci_info.h:63
unsigned get_pucch_format2_E_total(unsigned nof_prb, unsigned nof_symbols)
Calculates the total rate matching output sequence length , as per Table 6.3.1.4-1 TS 38....
Definition pucch_info.h:32

◆ pusch_default_time_allocation_default_A_get()

pusch_default_time_allocation_config srsran::pusch_default_time_allocation_default_A_get ( cyclic_prefix cp,
unsigned row_index,
subcarrier_spacing scs )

Determines the default PUSCH time-domain resource allocation A.

The time domain allocation configuration is described in TS38.214 Table 5.1.2.1.1-2 for normal cyclic prefix and TS38.214 Table 5.1.2.1.1-3 for extended cyclic prefix.

Parameters
[in]cpCyclic prefix.
[in]row_indexRow index.
[in]scsPUSCH subcarrier spacing.
Returns
A valid PUSCH time-domain allocation configuration is the provided parameters are valid. Otherwise, PUSCH_DEFAULT_TIME_ALLOCATION_RESERVED.
110{
111 switch (cp) {
115 default:
117 }
118}

◆ pusch_default_time_allocations_default_A_table()

span< const pusch_time_domain_resource_allocation > srsran::pusch_default_time_allocations_default_A_table ( cyclic_prefix cp,
subcarrier_spacing scs )

Determines the table of default PUSCH time-domain resource allocation A.

Parameters
[in]cpCyclic prefix.
[in]scsPUSCH subcarrier spacing.
Returns
A list of valid PUSCH time-domain allocation configurations to choose from.
122{
123 // TS38.214 Table 5.1.2.1.1-2.
124 static constexpr size_t PUSCH_TD_RES_ALLOC_TABLE_SIZE = 16;
125
126 // Build PUSCH-TimeDomain tables statically.
128 std::array<pusch_time_domain_resource_allocation, PUSCH_TD_RES_ALLOC_TABLE_SIZE> table;
129 for (unsigned i = 0; i < PUSCH_TD_RES_ALLOC_TABLE_SIZE; ++i) {
131 table[i].k2 = cfg.k2;
132 table[i].map_type = cfg.mapping_type;
133 table[i].symbols = {cfg.start_symbol, cfg.duration};
134 }
135 return table;
136 };
137 static const std::array<std::array<pusch_time_domain_resource_allocation, PUSCH_TD_RES_ALLOC_TABLE_SIZE>, 8> tables =
146
147 // Retrieve respective table.
148 return tables[static_cast<unsigned>(cp.value) * 4 + to_numerology_value(scs)];
149}
pusch_default_time_allocation_config pusch_default_time_allocation_default_A_get(cyclic_prefix cp, unsigned row_index, subcarrier_spacing scs)
Determines the default PUSCH time-domain resource allocation A.
Definition pusch_default_time_allocation.cpp:109
subcarrier_spacing
Representation of subcarrier spacing.
Definition subcarrier_spacing.h:34
Collects the PUSCH default time-domain allocation parameters.
Definition pusch_default_time_allocation.h:37
uint8_t k2
PDCCH to PUSCH delay in slots, parameter . The range is {0, 1}.
Definition pusch_default_time_allocation.h:41
uint8_t start_symbol
Start symbol index within the slot, parameter . The range is {0, ..., 10}.
Definition pusch_default_time_allocation.h:43
uint8_t duration
Transmission duration in symbols, parameter . The range is {2, ..., 12}.
Definition pusch_default_time_allocation.h:45
sch_mapping_type mapping_type
PUSCH mapping.
Definition pusch_default_time_allocation.h:39

◆ pusch_dmrs_symbol_mask_mapping_type_A_single_get()

dmrs_symbol_mask srsran::pusch_dmrs_symbol_mask_mapping_type_A_single_get ( const pusch_dmrs_symbol_mask_mapping_type_A_single_configuration & config)

Calculates the DM-RS for PUSCH symbol mask for single duration.

It is implemented as per TS38.211 Table 6.4.1.1.3-3.

Any configuration that is not covered in the table triggers an assertion.

29{
30 unsigned l0 = static_cast<unsigned>(config.typeA_pos);
31
33 mask.set(l0);
34
35 if (config.last_symbol < 8 || config.additional_position == dmrs_additional_positions::pos0) {
36 return mask;
37 }
38
39 if (config.last_symbol < 10) {
40 mask.set(7);
41 return mask;
42 }
43
44 if (config.last_symbol < 13 &&
45 (config.last_symbol != 12 || config.additional_position < dmrs_additional_positions::pos3)) {
46 mask.set(9);
47 if (config.additional_position >= dmrs_additional_positions::pos2) {
48 mask.set(6);
49 }
50 return mask;
51 }
52
53 mask.set(11);
54 if (config.additional_position == dmrs_additional_positions::pos2) {
55 mask.set(7);
56 } else if (config.additional_position == dmrs_additional_positions::pos3) {
57 mask.set(5);
58 mask.set(8);
59 }
60
61 return mask;
62}
dmrs_additional_positions additional_position
Indicates the number of additional DM-RS positions in time domain.
Definition pusch_dmrs_symbol_mask.h:39
dmrs_typeA_position typeA_pos
Indicates the first OFDM symbol within the slot carrying DMRS.
Definition pusch_dmrs_symbol_mask.h:35
bounded_integer< uint8_t, 5, 14 > last_symbol
Last OFDM symbol scheduled for PUSCH.
Definition pusch_dmrs_symbol_mask.h:47

◆ pusch_mcs_get_config()

sch_mcs_description srsran::pusch_mcs_get_config ( pusch_mcs_table table,
sch_mcs_index index,
bool tp_pi2bpsk_present )

Gets the Modulation and Coding Scheme configuration for PUSCH.

Reserved target code rates and spectral efficiencies are indicated with zero.

Parameters
[in]tableMCS table.
[in]indexMCS index.
[in]tp_pi2bpsk_presentSet to true if higher layer parameter tp-pi2BPSK is enabled. See TS38.331 Section 6.3.2 Information Element PUSCH-Config for more information.
Returns
Modulation and Coding Scheme parameters.
30{
31 // TS38.214 Table 6.1.4.1-1.
32 static constexpr std::array<sch_mcs_description, 32> MCS_INDEX_TABLE_1_TP = {
33 {{modulation_scheme::PI_2_BPSK, 240.0F}, {modulation_scheme::PI_2_BPSK, 314.0F},
34 {modulation_scheme::QPSK, 193.0F}, {modulation_scheme::QPSK, 251.0F},
35 {modulation_scheme::QPSK, 308.0F}, {modulation_scheme::QPSK, 379.0F},
36 {modulation_scheme::QPSK, 449.0F}, {modulation_scheme::QPSK, 526.0F},
37 {modulation_scheme::QPSK, 602.0F}, {modulation_scheme::QPSK, 679.0F},
38 {modulation_scheme::QAM16, 340.0F}, {modulation_scheme::QAM16, 378.0F},
39 {modulation_scheme::QAM16, 434.0F}, {modulation_scheme::QAM16, 490.0F},
40 {modulation_scheme::QAM16, 553.0F}, {modulation_scheme::QAM16, 616.0F},
41 {modulation_scheme::QAM16, 658.0F}, {modulation_scheme::QAM64, 466.0F},
42 {modulation_scheme::QAM64, 517.0F}, {modulation_scheme::QAM64, 567.0F},
43 {modulation_scheme::QAM64, 616.0F}, {modulation_scheme::QAM64, 666.0F},
44 {modulation_scheme::QAM64, 719.0F}, {modulation_scheme::QAM64, 772.0F},
45 {modulation_scheme::QAM64, 822.0F}, {modulation_scheme::QAM64, 873.0F},
46 {modulation_scheme::QAM64, 910.0F}, {modulation_scheme::QAM64, 948.0F},
47 {modulation_scheme::PI_2_BPSK, 0.0F}, {modulation_scheme::QPSK, 0.0F},
48 {modulation_scheme::QAM16, 0.0F}, {modulation_scheme::QAM64, 0.0F}}};
49
50 // TS38.214 Table 6.1.4.1-2.
51 static constexpr std::array<sch_mcs_description, 32> MCS_INDEX_TABLE_2_TP = {
52 {{modulation_scheme::PI_2_BPSK, 60.0F}, {modulation_scheme::PI_2_BPSK, 80.0F},
53 {modulation_scheme::PI_2_BPSK, 100.0F}, {modulation_scheme::PI_2_BPSK, 128.0F},
54 {modulation_scheme::PI_2_BPSK, 156.0F}, {modulation_scheme::PI_2_BPSK, 198.0F},
55 {modulation_scheme::QPSK, 120.0F}, {modulation_scheme::QPSK, 157.0F},
56 {modulation_scheme::QPSK, 193.0F}, {modulation_scheme::QPSK, 251.0F},
57 {modulation_scheme::QPSK, 308.0F}, {modulation_scheme::QPSK, 379.0F},
58 {modulation_scheme::QPSK, 449.0F}, {modulation_scheme::QPSK, 526.0F},
59 {modulation_scheme::QPSK, 602.0F}, {modulation_scheme::QPSK, 679.0F},
60 {modulation_scheme::QAM16, 378.0F}, {modulation_scheme::QAM16, 434.0F},
61 {modulation_scheme::QAM16, 490.0F}, {modulation_scheme::QAM16, 553.0F},
62 {modulation_scheme::QAM16, 616.0F}, {modulation_scheme::QAM16, 658.0F},
63 {modulation_scheme::QAM16, 699.0F}, {modulation_scheme::QAM16, 772.0F},
64 {modulation_scheme::QAM64, 567.0F}, {modulation_scheme::QAM64, 616.0F},
65 {modulation_scheme::QAM64, 666.5F}, {modulation_scheme::QAM64, 772.0F},
66 {modulation_scheme::PI_2_BPSK, 0.0F}, {modulation_scheme::QPSK, 0.0F},
67 {modulation_scheme::QAM16, 0.0F}, {modulation_scheme::QAM64, 0.0F}}};
68
69 // Return the MCS configuration from the selected table.
70 sch_mcs_description result = {};
71 switch (table) {
72 case pusch_mcs_table::qam64:
73 case pusch_mcs_table::qam256:
74 case pusch_mcs_table::qam64LowSe:
75 // Reuses PDSCH tables.
76 return pdsch_mcs_get_config(static_cast<pdsch_mcs_table>(table), index);
77 case pusch_mcs_table::qam64_tp:
78 result = MCS_INDEX_TABLE_1_TP[index.to_uint()];
79 break;
80 case pusch_mcs_table::qam64LowSe_tp:
81 result = MCS_INDEX_TABLE_2_TP[index.to_uint()];
82 break;
83 }
84
85 if (result.modulation == modulation_scheme::PI_2_BPSK && !tp_pi2bpsk_present) {
86 result.target_code_rate /= 2;
87 }
88
89 return result;
90}

◆ qos_flow_id_to_uint()

constexpr uint8_t srsran::qos_flow_id_to_uint ( qos_flow_id_t id)
inlineconstexpr

Convert QoS Flow ID type to integer.

63{
64 return static_cast<uint8_t>(id);
65}

◆ qos_prio_level_to_uint()

constexpr uint8_t srsran::qos_prio_level_to_uint ( qos_prio_level_t qos_prio_level)
inlineconstexpr

Convert QoS Priority Level type to integer.

38{
39 return static_cast<uint8_t>(qos_prio_level);
40}

◆ ra_frequency_type1_from_riv()

ra_frequency_type1_configuration srsran::ra_frequency_type1_from_riv ( unsigned N_bwp_size,
unsigned riv )

Calculates the PRBs from $RIV$ as per TS 38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink.

41{
43 out.N_bwp_size = N_bwp_size;
44 sliv_to_s_and_l(N_bwp_size, riv, out.start_vrb, out.length_vrb);
45 return out;
46}
constexpr void sliv_to_s_and_l(unsigned N, unsigned sliv, Integer &S, Integer &L)
Convert SLIV to start S and length L.
Definition sliv.h:14
unsigned N_bwp_size
BWP size in resource blocks, parameter .
Definition resource_allocation_frequency.h:50
unsigned start_vrb
Start VRB index .
Definition resource_allocation_frequency.h:52
unsigned length_vrb
Length in terms of contiguously allocated resource blocks .
Definition resource_allocation_frequency.h:54

◆ ra_frequency_type1_get_riv()

unsigned int srsran::ra_frequency_type1_get_riv ( const ra_frequency_type1_configuration & config)

Calculates the resource indication value $RIV$ as per TS38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink.

if $(L_{RB} - 1) \leq \left \lfloor N_{BWP}^{size}/2 \right \rfloor$, then
$RIV = N_{BWP}^{size}(L_{RBs}-1)+RB_{start}$
Otherwise,
$RIV = N_{BWP}^{size}(N_{BWP}^{size}-L_{RBs}+1)+(N_{BWP}^{size}-1-RB_{start})$.

30{
31 srsran_assert(config.length_vrb >= 1,
32 "The number of contiguous allocated blocks must be greater than or equal to 1.");
33 srsran_assert(config.length_vrb <= (config.N_bwp_size - config.start_vrb),
34 "The number of contiguous allocated blocks exceeds the maximum ({}).",
35 config.N_bwp_size - config.start_vrb);
36
37 return sliv_from_s_and_l(config.N_bwp_size, config.start_vrb, config.length_vrb);
38}

◆ ra_frequency_type1_special_get_riv()

unsigned srsran::ra_frequency_type1_special_get_riv ( const ra_frequency_type1_special_configuration & config)

Calculates the resource indication value $RIV$ for special cases as per TS38.214 Section 5.1.2.2.2 for Downlink and Section 6.1.2.2 for Uplink.

if $(L'_{RB} - 1) \leq \left \lfloor N_{BWP}^{initial}/2 \right \rfloor$, then
$RIV = N_{BWP}^{initial}(L'_{RBs}-1)+RB'_{start}$
Otherwise,
$RIV = N_{BWP}^{initial}(N_{BWP}^{initial}-L'_{RBs}+1)+(N_{BWP}^{initial}-1-RB'_{start})$.
Where $L'_{RB}=L_{RB}/K$, $RB'_{start}=RB_{start}/K$.
if $N_{BWP}^{active}>N_{BWP}^{initial}$ then $K$ is the maximum value from set {1,2,4,8} which satisfies $K \leq \left \lfloor N_{BWP}^{active}/ N_{BWP}^{initial}\right \rfloor$; otherwise $K=1$.

49{
50 // Determine K.
51 unsigned K = 8;
52 while (K > 1) {
53 if (K <= (config.N_bwp_active / config.N_bwp_initial)) {
54 break;
55 }
56 K /= 2;
57 }
58
59 unsigned start_vrb = config.start_vrb / K;
60 unsigned length_vrb = config.length_vrb / K;
61
62 srsran_assert(length_vrb >= 1, "The number of contiguous allocated blocks must be greater than or equal to 1.");
63 srsran_assert(length_vrb <= (config.N_bwp_initial - start_vrb),
64 "The number of contiguous allocated blocks ({}) exceeds the maximum ({}). K={} RB_start={} L_RBs={} "
65 "N_bwp_initial={} N_bwp_active={}.",
66 length_vrb,
67 config.N_bwp_initial - start_vrb,
68 K,
69 config.start_vrb,
70 config.length_vrb,
71 config.N_bwp_initial,
72 config.N_bwp_active);
73
74 return sliv_from_s_and_l(config.N_bwp_initial, start_vrb, length_vrb);
75}
unsigned N_bwp_initial
Initial BWP size in resource blocks, parameter .
Definition resource_allocation_frequency.h:89
unsigned N_bwp_active
Active BWP size in resource blocks, parameter .
Definition resource_allocation_frequency.h:91
unsigned length_vrb
Length in terms of contiguously allocated resource blocks .
Definition resource_allocation_frequency.h:95
unsigned start_vrb
Start VRB index .
Definition resource_allocation_frequency.h:93

◆ ra_scs_to_Hz()

constexpr unsigned srsran::ra_scs_to_Hz ( prach_subcarrier_spacing ra_scs)
inlineconstexpr

Converts SCS to its integer value in hertz.

83{
84 srsran_assert(is_scs_valid(ra_scs), "Invalid SCS.");
85 switch (ra_scs) {
86 case prach_subcarrier_spacing::kHz15:
87 case prach_subcarrier_spacing::kHz30:
88 case prach_subcarrier_spacing::kHz60:
89 case prach_subcarrier_spacing::kHz120:
90 case prach_subcarrier_spacing::invalid:
91 default:
92 return 15000U << to_numerology_value(ra_scs);
93 case prach_subcarrier_spacing::kHz1_25:
94 return 1250;
95 case prach_subcarrier_spacing::kHz5:
96 return 5000;
97 }
98}

◆ ran_ue_id_to_uint()

uint64_t srsran::ran_ue_id_to_uint ( ran_ue_id_t id)
inline

Convert RAN_UE_ID type to integer.

80{
81 return static_cast<uint64_t>(id);
82}

◆ report_error()

template<typename... Args>
void srsran::report_error ( const char * reason_fmt,
Args &&... args )
inlinenoexcept

Reports an error and closes the application gracefully. This function is intended to be used for error conditions that may be triggered by the user or through invalid configurations.

46{
47 srslog::flush();
48 ::fflush(stdout);
49 fmt::print(stderr, "srsGNB ERROR: {}\n", fmt::format(reason_fmt, std::forward<Args>(args)...));
50
51 std::quick_exit(1);
52}

◆ report_fatal_error()

template<typename... Args>
void srsran::report_fatal_error ( const char * reason_fmt,
Args &&... args )
inlinenoexcept

Reports a fatal error and handles the application shutdown. This function is intended to be used for error conditions that aren't neither caught by the compiler nor possible to handle by the application at runtime.

58{
59 srsran_terminate("srsGNB FATAL ERROR: {}\n", fmt::format(reason_fmt, std::forward<Args>(args)...));
60}

◆ retx_bsr_timer_to_value()

std::underlying_type< periodic_bsr_timer >::type srsran::retx_bsr_timer_to_value ( retx_bsr_timer timer)
inline

Return the value of retx_bsr_timer.

129{
130 return static_cast<std::underlying_type<periodic_bsr_timer>::type>(timer);
131}

◆ reverse_byte()

template<typename Integer >
Integer srsran::reverse_byte ( Integer byte)
inline

Reverses the bits of a given byte.

136{
137 static_assert(std::is_convertible<Integer, uint8_t>::value,
138 "The input type must be convertible to an unsigned integer of eight bits");
139 static const std::array<Integer, 256> reverse_lut = {
140 0b00000000, 0b10000000, 0b01000000, 0b11000000, 0b00100000, 0b10100000, 0b01100000, 0b11100000, 0b00010000,
141 0b10010000, 0b01010000, 0b11010000, 0b00110000, 0b10110000, 0b01110000, 0b11110000, 0b00001000, 0b10001000,
142 0b01001000, 0b11001000, 0b00101000, 0b10101000, 0b01101000, 0b11101000, 0b00011000, 0b10011000, 0b01011000,
143 0b11011000, 0b00111000, 0b10111000, 0b01111000, 0b11111000, 0b00000100, 0b10000100, 0b01000100, 0b11000100,
144 0b00100100, 0b10100100, 0b01100100, 0b11100100, 0b00010100, 0b10010100, 0b01010100, 0b11010100, 0b00110100,
145 0b10110100, 0b01110100, 0b11110100, 0b00001100, 0b10001100, 0b01001100, 0b11001100, 0b00101100, 0b10101100,
146 0b01101100, 0b11101100, 0b00011100, 0b10011100, 0b01011100, 0b11011100, 0b00111100, 0b10111100, 0b01111100,
147 0b11111100, 0b00000010, 0b10000010, 0b01000010, 0b11000010, 0b00100010, 0b10100010, 0b01100010, 0b11100010,
148 0b00010010, 0b10010010, 0b01010010, 0b11010010, 0b00110010, 0b10110010, 0b01110010, 0b11110010, 0b00001010,
149 0b10001010, 0b01001010, 0b11001010, 0b00101010, 0b10101010, 0b01101010, 0b11101010, 0b00011010, 0b10011010,
150 0b01011010, 0b11011010, 0b00111010, 0b10111010, 0b01111010, 0b11111010, 0b00000110, 0b10000110, 0b01000110,
151 0b11000110, 0b00100110, 0b10100110, 0b01100110, 0b11100110, 0b00010110, 0b10010110, 0b01010110, 0b11010110,
152 0b00110110, 0b10110110, 0b01110110, 0b11110110, 0b00001110, 0b10001110, 0b01001110, 0b11001110, 0b00101110,
153 0b10101110, 0b01101110, 0b11101110, 0b00011110, 0b10011110, 0b01011110, 0b11011110, 0b00111110, 0b10111110,
154 0b01111110, 0b11111110, 0b00000001, 0b10000001, 0b01000001, 0b11000001, 0b00100001, 0b10100001, 0b01100001,
155 0b11100001, 0b00010001, 0b10010001, 0b01010001, 0b11010001, 0b00110001, 0b10110001, 0b01110001, 0b11110001,
156 0b00001001, 0b10001001, 0b01001001, 0b11001001, 0b00101001, 0b10101001, 0b01101001, 0b11101001, 0b00011001,
157 0b10011001, 0b01011001, 0b11011001, 0b00111001, 0b10111001, 0b01111001, 0b11111001, 0b00000101, 0b10000101,
158 0b01000101, 0b11000101, 0b00100101, 0b10100101, 0b01100101, 0b11100101, 0b00010101, 0b10010101, 0b01010101,
159 0b11010101, 0b00110101, 0b10110101, 0b01110101, 0b11110101, 0b00001101, 0b10001101, 0b01001101, 0b11001101,
160 0b00101101, 0b10101101, 0b01101101, 0b11101101, 0b00011101, 0b10011101, 0b01011101, 0b11011101, 0b00111101,
161 0b10111101, 0b01111101, 0b11111101, 0b00000011, 0b10000011, 0b01000011, 0b11000011, 0b00100011, 0b10100011,
162 0b01100011, 0b11100011, 0b00010011, 0b10010011, 0b01010011, 0b11010011, 0b00110011, 0b10110011, 0b01110011,
163 0b11110011, 0b00001011, 0b10001011, 0b01001011, 0b11001011, 0b00101011, 0b10101011, 0b01101011, 0b11101011,
164 0b00011011, 0b10011011, 0b01011011, 0b11011011, 0b00111011, 0b10111011, 0b01111011, 0b11111011, 0b00000111,
165 0b10000111, 0b01000111, 0b11000111, 0b00100111, 0b10100111, 0b01100111, 0b11100111, 0b00010111, 0b10010111,
166 0b01010111, 0b11010111, 0b00110111, 0b10110111, 0b01110111, 0b11110111, 0b00001111, 0b10001111, 0b01001111,
167 0b11001111, 0b00101111, 0b10101111, 0b01101111, 0b11101111, 0b00011111, 0b10011111, 0b01011111, 0b11011111,
168 0b00111111, 0b10111111, 0b01111111, 0b11111111,
169 };
170 return reverse_lut[byte];
171}

◆ rlc_am_pdu_header_max_size()

constexpr size_t srsran::rlc_am_pdu_header_max_size ( rlc_am_sn_size sn_size)
constexpr
59{
60 switch (sn_size) {
61 case rlc_am_sn_size::size12bits:
62 case rlc_am_sn_size::size18bits:
63 return rlc_am_pdu_header_min_size(sn_size) + rlc_am_pdu_header_so_size;
64 }
65 srsran_assertion_failure("Cannot determine RLC AM PDU header maximum size: unsupported sn_size={}.",
66 to_number(sn_size));
67 return rlc_am_pdu_header_min_size_12bit + rlc_am_pdu_header_so_size;
68}

◆ rlc_am_pdu_header_min_size()

constexpr size_t srsran::rlc_am_pdu_header_min_size ( rlc_am_sn_size sn_size)
constexpr
47{
48 switch (sn_size) {
49 case rlc_am_sn_size::size12bits:
50 return rlc_am_pdu_header_min_size_12bit;
51 case rlc_am_sn_size::size18bits:
52 return rlc_am_pdu_header_min_size_18bit;
53 }
54 srsran_assertion_failure("Cannot determine RLC AM PDU header minimum size: unsupported sn_size={}.",
55 to_number(sn_size));
56 return rlc_am_pdu_header_min_size_12bit;
57}

◆ rlc_am_read_data_pdu_header()

SRSRAN_NODISCARD bool srsran::rlc_am_read_data_pdu_header ( const byte_buffer_view & pdu,
const rlc_am_sn_size sn_size,
rlc_am_pdu_header * header )
inline
192{
193 byte_buffer_reader pdu_reader = pdu;
194 if (pdu_reader.length() <= rlc_am_pdu_header_min_size(sn_size)) {
195 srslog::fetch_basic_logger("RLC").warning(
196 "AMD PDU too small. pdu_len={} hdr_len={}", pdu.length(), rlc_am_pdu_header_min_size(sn_size));
197 return false;
198 }
199
200 header->sn_size = sn_size;
201
202 // Fixed part
203 header->dc = (rlc_dc_field)((*pdu_reader >> 7U) & 0x01U); // 1 bit D/C field
204 header->p = (*pdu_reader >> 6U) & 0x01U; // 1 bit P flag
205 header->si = (rlc_si_field)((*pdu_reader >> 4U) & 0x03U); // 2 bits SI
206
207 if (sn_size == rlc_am_sn_size::size12bits) {
208 header->sn = (*pdu_reader & 0x0fU) << 8U; // first 4 bits SN
209 ++pdu_reader;
210 if (pdu_reader.empty()) {
211 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing lower byte of SN.");
212 return false;
213 }
214 header->sn |= (*pdu_reader & 0xffU); // last 8 bits SN
215 ++pdu_reader;
216 } else if (sn_size == rlc_am_sn_size::size18bits) {
217 // sanity check
218 if ((*pdu_reader & 0x0cU) != 0) {
219 srslog::fetch_basic_logger("RLC").error("Malformed PDU, reserved bits are set.");
220 return false;
221 }
222 header->sn = (*pdu_reader & 0x03U) << 16U; // first 4 bits SN
223 ++pdu_reader;
224 if (pdu_reader.empty()) {
225 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing center byte of SN.");
226 return false;
227 }
228 header->sn |= (*pdu_reader & 0xffU) << 8U; // bit 2-10 of SN
229 ++pdu_reader;
230 if (pdu_reader.empty()) {
231 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing lower byte of SN.");
232 return false;
233 }
234 header->sn |= (*pdu_reader & 0xffU); // last 8 bits SN
235 ++pdu_reader;
236 } else {
237 srslog::fetch_basic_logger("RLC").error("Unsupported sn_size={}.", to_number(sn_size));
238 return false;
239 }
240
241 // Read optional part
242 if (header->si == rlc_si_field::last_segment || header->si == rlc_si_field::middle_segment) {
243 // read SO
244 if (pdu_reader.empty()) {
245 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing upper byte of SO.");
246 return false;
247 }
248 header->so = (*pdu_reader & 0xffU) << 8U;
249 ++pdu_reader;
250 if (pdu_reader.empty()) {
251 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing lower byte of SO.");
252 return false;
253 }
254 header->so |= (*pdu_reader & 0xffU);
255 ++pdu_reader;
256 }
257 return true;
258}
bool empty() const
Checks whether the view is empty.
Definition byte_buffer.h:83
rlc_si_field si
Segmentation info.
Definition rlc_am_pdu.h:74
uint16_t so
Sequence offset.
Definition rlc_am_pdu.h:77
rlc_am_sn_size sn_size
Sequence number size (12 or 18 bits)
Definition rlc_am_pdu.h:75
uint8_t p
Polling bit.
Definition rlc_am_pdu.h:73
uint32_t sn
Sequence number.
Definition rlc_am_pdu.h:76
rlc_dc_field dc
Data/Control (D/C) field.
Definition rlc_am_pdu.h:72

◆ rlc_am_write_data_pdu_header()

size_t srsran::rlc_am_write_data_pdu_header ( span< uint8_t > buf,
const rlc_am_pdu_header & header )
inline
261{
262 span<uint8_t>::iterator buf_it = buf.begin();
263
264 // fixed header part
265 *buf_it = (to_number(header.dc) & 0x01U) << 7U; // 1 bit D/C field
266
267 *buf_it |= (header.p & 0x01U) << 6U; // 1 bit P flag
268 *buf_it |= (to_number(header.si) & 0x03U) << 4U; // 2 bits SI
269
270 if (header.sn_size == rlc_am_sn_size::size12bits) {
271 // 12-bit SN
272 *buf_it |= (header.sn >> 8U) & 0x0fU; // upper 4 bits of SN
273 ++buf_it;
274 *buf_it = header.sn & 0xffU; // remaining 8 bits of SN
275 } else {
276 // 18-bit SN
277 *buf_it |= (header.sn >> 16U) & 0x3U; // upper 2 bits of SN
278 ++buf_it;
279 *buf_it = header.sn >> 8U; // center 8 bits of SN
280 ++buf_it;
281 *buf_it = header.sn & 0xffU; // lower 8 bits of SN
282 }
283 ++buf_it;
284
285 if (header.so != 0) {
286 // write SO
287 *buf_it = header.so >> 8U; // upper part of SO
288 ++buf_it;
289 *buf_it = header.so & 0xffU; // lower part of SO
290 ++buf_it;
291 }
292 return std::distance(buf.begin(), buf_it);
293}

◆ rlc_max_retx_threshold_from_int()

bool srsran::rlc_max_retx_threshold_from_int ( rlc_max_retx_threshold & max_retx_threshold,
int num )
inline
314{
315 switch (num) {
316 case 1:
317 case 2:
318 case 3:
319 case 4:
320 case 6:
321 case 8:
322 case 16:
323 case 32:
324 max_retx_threshold = static_cast<rlc_max_retx_threshold>(num);
325 return true;
326 default:
327 return false;
328 }
329}

◆ rlc_mode_to_asn1()

asn1::e1ap::rlc_mode_e srsran::rlc_mode_to_asn1 ( srsran::pdcp_rlc_mode rlc_mod)
inline

Converts rlc_mode type to an E1AP ASN.1 type.

Parameters
rlc_modrlc_mode type.
Returns
The E1AP ASN.1 object where the result of the conversion is stored.
306{
307 asn1::e1ap::rlc_mode_e asn1_rlc_mode = {};
308
309 switch (rlc_mod) {
310 case srsran::pdcp_rlc_mode::um:
311 asn1_rlc_mode = asn1::e1ap::rlc_mode_opts::rlc_um_bidirectional;
312 break;
313 case srsran::pdcp_rlc_mode::am:
314 asn1_rlc_mode = asn1::e1ap::rlc_mode_opts::rlc_am;
315 break;
316 default:
317 srsran_assert(false, "Invalid RLC mode ({})", rlc_mod);
318 }
319
320 return asn1_rlc_mode;
321}

◆ rlc_poll_kilo_bytes_from_int()

bool srsran::rlc_poll_kilo_bytes_from_int ( rlc_poll_kilo_bytes & poll_bytes,
int num )
inline
438{
439 switch (num) {
440 case 1:
441 case 2:
442 case 5:
443 case 8:
444 case 10:
445 case 15:
446 case 25:
447 case 50:
448 case 75:
449 case 100:
450 case 125:
451 case 250:
452 case 375:
453 case 500:
454 case 750:
455 case 1000:
456 case 1250:
457 case 1500:
458 case 2000:
459 case 3000:
460 case 4000:
461 case 4500:
462 case 5000:
463 case 5500:
464 case 6000:
465 case 6500:
466 case 7000:
467 case 7500:
468 case 8000:
469 case 9000:
470 case 10000:
471 case 11000:
472 case 12000:
473 case 13000:
474 case 14000:
475 case 15000:
476 case 16000:
477 case 17000:
478 case 18000:
479 case 20000:
480 case 25000:
481 case 30000:
482 case 40000:
483 case -1:
484 poll_bytes = static_cast<rlc_poll_kilo_bytes>(num);
485 return true;
486 default:
487 return false;
488 }
489}

◆ rlc_poll_pdu_from_int()

bool srsran::rlc_poll_pdu_from_int ( rlc_poll_pdu & poll_pdu,
int num )
inline
358{
359 switch (num) {
360 case 4:
361 case 8:
362 case 16:
363 case 32:
364 case 64:
365 case 128:
366 case 256:
367 case 512:
368 case 1024:
369 case 2048:
370 case 4096:
371 case 6144:
372 case 8192:
373 case 12288:
374 case 16384:
375 case 20480:
376 case 24576:
377 case 28672:
378 case 32768:
379 case 40960:
380 case 49152:
381 case 57344:
382 case 65536:
383 case -1:
384 poll_pdu = static_cast<rlc_poll_pdu>(num);
385 return true;
386 default:
387 return false;
388 }
389}

◆ rlc_t_poll_retransmit_from_int()

bool srsran::rlc_t_poll_retransmit_from_int ( rlc_t_poll_retransmit & t_poll_retransmit,
int num )
inline
244{
245 switch (num) {
246 case 5:
247 case 10:
248 case 15:
249 case 20:
250 case 25:
251 case 30:
252 case 35:
253 case 40:
254 case 45:
255 case 50:
256 case 55:
257 case 60:
258 case 65:
259 case 70:
260 case 75:
261 case 80:
262 case 85:
263 case 90:
264 case 95:
265 case 100:
266 case 105:
267 case 110:
268 case 115:
269 case 120:
270 case 125:
271 case 130:
272 case 135:
273 case 140:
274 case 145:
275 case 150:
276 case 155:
277 case 160:
278 case 165:
279 case 170:
280 case 175:
281 case 180:
282 case 185:
283 case 190:
284 case 195:
285 case 200:
286 case 205:
287 case 210:
288 case 215:
289 case 220:
290 case 225:
291 case 230:
292 case 235:
293 case 240:
294 case 245:
295 case 250:
296 case 300:
297 case 350:
298 case 400:
299 case 450:
300 case 500:
301 case 800:
302 case 1000:
303 case 2000:
304 case 4000:
305 t_poll_retransmit = static_cast<rlc_t_poll_retransmit>(num);
306 return true;
307 default:
308 return false;
309 }
310}

◆ rlc_t_reassembly_from_int()

bool srsran::rlc_t_reassembly_from_int ( rlc_t_reassembly & t_reassembly,
int num )
inline
141{
142 switch (num) {
143 case 0:
144 case 5:
145 case 10:
146 case 15:
147 case 20:
148 case 25:
149 case 30:
150 case 35:
151 case 40:
152 case 45:
153 case 50:
154 case 55:
155 case 60:
156 case 65:
157 case 70:
158 case 75:
159 case 80:
160 case 85:
161 case 90:
162 case 95:
163 case 100:
164 case 110:
165 case 120:
166 case 130:
167 case 140:
168 case 150:
169 case 160:
170 case 170:
171 case 180:
172 case 190:
173 case 200:
174 t_reassembly = static_cast<rlc_t_reassembly>(num);
175 return true;
176 default:
177 return false;
178 }
179}
rlc_t_reassembly
Converts sequence number field to numeric its value.
Definition rlc_config.h:107

◆ rlc_t_status_prohibit_from_int()

bool srsran::rlc_t_status_prohibit_from_int ( rlc_t_status_prohibit & status_prohibit,
int num )
inline
556{
557 switch (num) {
558 case 0:
559 case 5:
560 case 10:
561 case 15:
562 case 20:
563 case 25:
564 case 30:
565 case 35:
566 case 40:
567 case 45:
568 case 50:
569 case 55:
570 case 60:
571 case 65:
572 case 70:
573 case 75:
574 case 80:
575 case 85:
576 case 90:
577 case 95:
578 case 100:
579 case 105:
580 case 110:
581 case 115:
582 case 120:
583 case 125:
584 case 130:
585 case 135:
586 case 140:
587 case 145:
588 case 150:
589 case 155:
590 case 160:
591 case 165:
592 case 170:
593 case 175:
594 case 180:
595 case 185:
596 case 190:
597 case 195:
598 case 200:
599 case 205:
600 case 210:
601 case 215:
602 case 220:
603 case 225:
604 case 230:
605 case 235:
606 case 240:
607 case 245:
608 case 250:
609 case 300:
610 case 350:
611 case 400:
612 case 450:
613 case 500:
614 case 800:
615 case 1000:
616 case 1200:
617 case 1600:
618 case 2000:
619 case 2400:
620 status_prohibit = static_cast<rlc_t_status_prohibit>(num);
621 return true;
622 default:
623 return false;
624 }
625}

◆ rlc_um_nr_packed_length()

size_t srsran::rlc_um_nr_packed_length ( const rlc_um_pdu_header & header)
inline
150{
151 size_t len = 0;
152 if (header.si == rlc_si_field::full_sdu) {
153 // that's all ..
154 len++;
155 } else {
156 if (header.sn_size == rlc_um_sn_size::size6bits) {
157 // Only 1B for SN
158 len++;
159 } else {
160 // 2 B for 12bit SN
161 len += 2;
162 }
163 if (header.so) {
164 // Two bytes always for segment information
165 len += 2;
166 }
167 }
168 return len;
169}
rlc_um_sn_size sn_size
Sequence number size (6 or 12 bits)
Definition rlc_um_pdu.h:65
uint16_t so
Segment offset.
Definition rlc_um_pdu.h:67
rlc_si_field si
Segmentation info.
Definition rlc_um_pdu.h:64

◆ rlc_um_pdu_header_size_no_so()

constexpr size_t srsran::rlc_um_pdu_header_size_no_so ( rlc_um_sn_size sn_size)
constexpr
36{
37 switch (sn_size) {
38 case rlc_um_sn_size::size6bits:
39 return rlc_um_pdu_header_size_6bit_sn_no_so;
40 case rlc_um_sn_size::size12bits:
41 return rlc_um_pdu_header_size_12bit_sn_no_so;
42 }
43 srsran_assertion_failure("Cannot determine RLC UM PDU header size without SO: unsupported sn_size={}.",
44 to_number(sn_size));
45 return rlc_um_pdu_header_size_6bit_sn_no_so;
46}

◆ rlc_um_pdu_header_size_with_so()

constexpr size_t srsran::rlc_um_pdu_header_size_with_so ( rlc_um_sn_size sn_size)
constexpr
51{
52 switch (sn_size) {
53 case rlc_um_sn_size::size6bits:
54 return rlc_um_pdu_header_size_6bit_sn_with_so;
55 case rlc_um_sn_size::size12bits:
56 return rlc_um_pdu_header_size_12bit_sn_with_so;
57 }
58 srsran_assertion_failure("Cannot determine RLC UM PDU header size with SO: unsupported sn_size={}.",
59 to_number(sn_size));
60 return rlc_um_pdu_header_size_6bit_sn_no_so;
61}

◆ rlc_um_read_data_pdu_header()

bool srsran::rlc_um_read_data_pdu_header ( const byte_buffer_view & pdu,
const rlc_um_sn_size sn_size,
rlc_um_pdu_header * header )
inline
76{
77 byte_buffer_reader pdu_reader = pdu;
78 if (pdu_reader.empty()) {
79 srslog::fetch_basic_logger("RLC").warning(
80 "UMD PDU too small. pdu_len={} hdr_len={}", pdu.length(), rlc_um_pdu_header_size_no_so(sn_size));
81 return false;
82 }
83
84 header->sn_size = sn_size;
85
86 // Fixed part
87 if (sn_size == rlc_um_sn_size::size6bits) {
88 header->si = (rlc_si_field)((*pdu_reader >> 6U) & 0x03U); // 2 bits SI
89 header->sn = *pdu_reader & 0x3fU; // 6 bits SN
90 // sanity check
91 if (header->si == rlc_si_field::full_sdu and header->sn != 0) {
92 srslog::fetch_basic_logger("RLC").error("Malformed PDU, reserved bits are set.");
93 return false;
94 }
95 ++pdu_reader;
96 } else if (sn_size == rlc_um_sn_size::size12bits) {
97 header->si = (rlc_si_field)((*pdu_reader >> 6U) & 0x03U); // 2 bits SI
98 header->sn = (*pdu_reader & 0x0fU) << 8U; // 4 bits SN
99 if (header->si == rlc_si_field::full_sdu and header->sn != 0) {
100 srslog::fetch_basic_logger("RLC").error("Malformed PDU, reserved bits are set.");
101 return false;
102 }
103
104 // sanity check
105 if (header->si == rlc_si_field::first_segment) {
106 // make sure two reserved bits are not set
107 if (((*pdu_reader >> 4U) & 0x03U) != 0) {
108 srslog::fetch_basic_logger("RLC").error("Malformed PDU, reserved bits are set.");
109 return false;
110 }
111 }
112
113 if (header->si != rlc_si_field::full_sdu) {
114 // continue unpacking remaining SN
115 ++pdu_reader;
116 if (pdu_reader.empty()) {
117 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing lower byte of SN.");
118 return false;
119 }
120 header->sn |= (*pdu_reader & 0xffU); // 8 bits SN
121 }
122
123 ++pdu_reader;
124 } else {
125 srslog::fetch_basic_logger("RLC").error("Unsupported sn_size={}.", to_number(sn_size));
126 return false;
127 }
128
129 // Read optional part
130 if (header->si == rlc_si_field::last_segment || header->si == rlc_si_field::middle_segment) {
131 // read SO
132 if (pdu_reader.empty()) {
133 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing upper byte of SO.");
134 return false;
135 }
136 header->so = (*pdu_reader & 0xffU) << 8U;
137 ++pdu_reader;
138 if (pdu_reader.empty()) {
139 srslog::fetch_basic_logger("RLC").error("Malformed PDU, missing lower byte of SO.");
140 return false;
141 }
142 header->so |= (*pdu_reader & 0xffU);
143 ++pdu_reader;
144 }
145
146 return true;
147}
uint16_t sn
Sequence number.
Definition rlc_um_pdu.h:66

◆ rlc_um_write_data_pdu_header()

size_t srsran::rlc_um_write_data_pdu_header ( span< uint8_t > buf,
const rlc_um_pdu_header & header )
inline
172{
173 span<uint8_t>::iterator buf_it = buf.begin();
174
175 *buf_it = (to_number(header.si) & 0x03U) << 6U; // 2 bits SI
176
177 if (header.si == rlc_si_field::full_sdu) {
178 return 1; // that's all
179 }
180
181 if (header.sn_size == rlc_um_sn_size::size6bits) {
182 // 6-bit SN
183 *buf_it |= (header.sn & 0x3fU); // write SN (6 bit)
184 buf_it++;
185 } else {
186 // 12-bit SN
187 *buf_it |= (header.sn >> 8U) & 0xfU; // upper 4 bits of SN
188 buf_it++;
189 *buf_it = header.sn & 0xffU; // lower part 8 bits of SN
190 buf_it++;
191 }
192 if (header.so != 0) {
193 // write SO
194 *buf_it = header.so >> 8U; // upper part of SO
195 buf_it++;
196 *buf_it = header.so & 0xffU; // lower part of SO
197 buf_it++;
198 }
199 return std::distance(buf.begin(), buf_it);
200}

◆ scs_to_khz()

constexpr unsigned srsran::scs_to_khz ( subcarrier_spacing scs)
inlineconstexpr

Converts SCS into integer in kHz.

57{
58 srsran_assert(is_scs_valid(scs), "Invalid SCS.");
59 return 15U << to_numerology_value(scs);
60}

◆ sctp_set_init_msg_opts()

bool srsran::sctp_set_init_msg_opts ( int fd,
optional< int > init_max_attempts,
optional< int > max_init_timeo,
srslog::basic_logger & logger )
inline

Modify SCTP default parameters for quicker detection of broken links. Changes to the SCTP_INITMSG parameters (to control the timeout of the connect() syscall)

87{
88 if (not init_max_attempts.has_value() && not max_init_timeo.has_value()) {
89 // No value set for init max attempts or max init_timeo,
90 // no need to call set_sockopts()
91 return true;
92 }
93
94 // Set SCTP INITMSG options to reduce blocking timeout of connect()
95 sctp_initmsg init_opts = {};
96 socklen_t init_sz = sizeof(sctp_initmsg);
97 if (getsockopt(fd, SOL_SCTP, SCTP_INITMSG, &init_opts, &init_sz) < 0) {
98 logger.error("Error getting sockopts. errno={}", strerror(errno));
99 return false; // Responsibility of closing the socket is on the caller
100 }
101
102 if (init_max_attempts.has_value()) {
103 init_opts.sinit_max_attempts = init_max_attempts.value();
104 }
105 if (max_init_timeo.has_value()) {
106 init_opts.sinit_max_init_timeo = max_init_timeo.value();
107 }
108
109 logger.debug("Setting SCTP_INITMSG options on SCTP socket. Max attempts {}, Max init attempts timeout {}",
110 init_opts.sinit_max_attempts,
111 init_opts.sinit_max_init_timeo);
112 if (::setsockopt(fd, SOL_SCTP, SCTP_INITMSG, &init_opts, init_sz) < 0) {
113 logger.error("Error setting SCTP_INITMSG sockopts. errno={}\n", strerror(errno));
114 return false; // Responsibility of closing the socket is on the caller
115 }
116 return true;
117}

◆ sctp_set_rto_opts()

bool srsran::sctp_set_rto_opts ( int fd,
optional< int > rto_initial,
optional< int > rto_min,
optional< int > rto_max,
srslog::basic_logger & logger )
inline

Modify SCTP default parameters for quicker detection of broken links. Changes to the maximum re-transmission timeout (rto_max).

42{
43 if (not rto_initial.has_value() && not rto_min.has_value() && not rto_max.has_value()) {
44 // no need to set RTO
45 return true;
46 }
47
48 // Set RTO_MAX to quickly detect broken links.
49 sctp_rtoinfo rto_opts = {};
50 socklen_t rto_sz = sizeof(sctp_rtoinfo);
51 rto_opts.srto_assoc_id = 0;
52 if (getsockopt(fd, SOL_SCTP, SCTP_RTOINFO, &rto_opts, &rto_sz) < 0) {
53 logger.error("Error getting RTO_INFO sockopts. errono={}", strerror(errno));
54 return false; // Responsibility of closing the socket is on the caller
55 }
56
57 if (rto_initial.has_value()) {
58 rto_opts.srto_initial = rto_initial.value();
59 }
60 if (rto_min.has_value()) {
61 rto_opts.srto_min = rto_min.value();
62 }
63 if (rto_max.has_value()) {
64 rto_opts.srto_max = rto_max.value();
65 }
66
67 logger.debug(
68 "Setting RTO_INFO options on SCTP socket. Association {}, Initial RTO {}, Minimum RTO {}, Maximum RTO {}",
69 rto_opts.srto_assoc_id,
70 rto_opts.srto_initial,
71 rto_opts.srto_min,
72 rto_opts.srto_max);
73
74 if (::setsockopt(fd, SOL_SCTP, SCTP_RTOINFO, &rto_opts, rto_sz) < 0) {
75 logger.error("Error setting RTO_INFO sockopts. errno={}", strerror(errno));
76 return false; // Responsibility of closing the socket is on the caller
77 }
78 return true;
79}

◆ sdap_config_to_e1ap_asn1()

asn1::e1ap::sdap_cfg_s srsran::sdap_config_to_e1ap_asn1 ( sdap_config_t sdap_cfg)
inline

Converts type sdap_config to an E1AP ASN.1 type.

Parameters
sdap_cfgsdap config object.
Returns
The E1AP ASN.1 object where the result of the conversion is stored.
230{
231 asn1::e1ap::sdap_cfg_s asn1_sdap_cfg;
232
233 if (sdap_cfg.default_drb) {
234 asn1_sdap_cfg.default_drb = asn1::e1ap::default_drb_opts::options::true_value;
235 } else {
236 asn1_sdap_cfg.default_drb = asn1::e1ap::default_drb_opts::options::false_value;
237 }
238
239 asn1_sdap_cfg.sdap_hdr_ul.value = sdap_hdr_ul_cfg_to_e1ap_asn1(sdap_cfg.sdap_hdr_ul);
240 asn1_sdap_cfg.sdap_hdr_dl.value = sdap_hdr_dl_cfg_to_e1ap_asn1(sdap_cfg.sdap_hdr_dl);
241
242 return asn1_sdap_cfg;
243}
Definition e1ap_ies.h:2567

◆ sdap_hdr_dl_cfg_to_e1ap_asn1()

asn1::e1ap::sdap_hdr_dl_opts::options srsran::sdap_hdr_dl_cfg_to_e1ap_asn1 ( sdap_hdr_dl_cfg hdr_cfg)
inline
214{
215 asn1::e1ap::sdap_hdr_dl_opts::options asn1_hdr_dl_opts;
216
217 if (hdr_cfg == sdap_hdr_dl_cfg::absent) {
218 asn1_hdr_dl_opts = asn1::e1ap::sdap_hdr_dl_opts::absent;
219 } else {
220 asn1_hdr_dl_opts = asn1::e1ap::sdap_hdr_dl_opts::present;
221 }
222
223 return asn1_hdr_dl_opts;
224}

◆ sdap_hdr_ul_cfg_to_e1ap_asn1()

asn1::e1ap::sdap_hdr_ul_opts::options srsran::sdap_hdr_ul_cfg_to_e1ap_asn1 ( sdap_hdr_ul_cfg hdr_cfg)
inline
201{
202 asn1::e1ap::sdap_hdr_ul_opts::options asn1_hdr_ul_opts;
203
204 if (hdr_cfg == sdap_hdr_ul_cfg::absent) {
205 asn1_hdr_ul_opts = asn1::e1ap::sdap_hdr_ul_opts::absent;
206 } else {
207 asn1_hdr_ul_opts = asn1::e1ap::sdap_hdr_ul_opts::present;
208 }
209
210 return asn1_hdr_ul_opts;
211}

◆ security_indication_to_asn1()

void srsran::security_indication_to_asn1 ( asn1::e1ap::security_ind_s & asn1obj,
const security_indication_t & security_ind )
inline

Converts type security_indication to an ASN.1 type.

Parameters
asn1objASN.1 object where the result of the conversion is stored.
security_indicationSecurity Indication IE contents.
1420{
1421 switch (security_ind.integrity_protection_ind) {
1422 case integrity_protection_indication_t::not_needed:
1423 case integrity_protection_indication_t::preferred:
1424 case integrity_protection_indication_t::required:
1425 asn1obj.integrity_protection_ind.value =
1426 static_cast<asn1::e1ap::integrity_protection_ind_opts::options>(security_ind.integrity_protection_ind);
1427 break;
1428 default:
1429 report_fatal_error("Cannot convert security indication to E1AP type");
1430 }
1431
1432 switch (security_ind.confidentiality_protection_ind) {
1433 case confidentiality_protection_indication_t::not_needed:
1434 case confidentiality_protection_indication_t::preferred:
1435 case confidentiality_protection_indication_t::required:
1436 asn1obj.confidentiality_protection_ind.value =
1437 static_cast<asn1::e1ap::confidentiality_protection_ind_opts::options>(
1438 security_ind.confidentiality_protection_ind);
1439 break;
1440 default:
1441 report_fatal_error("Cannot convert security indication to E1AP type");
1442 }
1443}

◆ security_result_required()

bool srsran::security_result_required ( const security_indication_t & security_indication)
inline

Checks whether a security_result shall be sent.

Helper function to determine whether the security_indication shall be replied with a security_result by the peer entity, i.e. if either integrity or confidentiality are set to 'preferred' so the peer entity can decide according to its capabilities. Ref: TS 38.413 Sec. 8.2.1.2, TS 38.463 Sec. 8.3.1.2

Parameters
security_indicationThe security_indication to be checked.
Returns
True if either integrity or confidentiality are set to 'preferred'; False otherwise.
218{
219 return security_indication.integrity_protection_ind == integrity_protection_indication_t::preferred ||
220 security_indication.confidentiality_protection_ind == confidentiality_protection_indication_t::preferred;
221}

◆ security_result_to_asn1()

void srsran::security_result_to_asn1 ( asn1::e1ap::security_result_s & asn1obj,
const security_result_t & security_result )
inline

Converts type security_result_t to an ASN.1 type.

Parameters
[out]asn1objASN.1 object where the result of the conversion is stored.
[in]security_resultSecurity Result IE contents.
1367{
1368 switch (security_result.integrity_protection_result) {
1369 case integrity_protection_result_t::performed:
1370 case integrity_protection_result_t::not_performed:
1371 asn1obj.integrity_protection_result.value = static_cast<asn1::e1ap::integrity_protection_result_opts::options>(
1372 security_result.integrity_protection_result);
1373 break;
1374 default:
1375 report_fatal_error("Cannot convert security result to E1AP type");
1376 }
1377
1378 switch (security_result.confidentiality_protection_result) {
1379 case confidentiality_protection_result_t::performed:
1380 case confidentiality_protection_result_t::not_performed:
1381 asn1obj.confidentiality_protection_result.value =
1382 static_cast<asn1::e1ap::confidentiality_protection_result_opts::options>(
1383 security_result.confidentiality_protection_result);
1384 break;
1385 default:
1386 report_fatal_error("Cannot convert security result to E1AP type");
1387 }
1388}

◆ set_bitmap_bit()

template<typename Integer >
void srsran::set_bitmap_bit ( Integer & bitmap,
unsigned bit,
bool enable )

Sets the value of a bit in the bitmap. When enable is true, it sets the bit, otherwise it clears the bit.

Parameters
[in]bitmapBitmap to modify.
[in]bitBit to change.
[in]enableValue to set. If true, sets the bit(1), otherwise clears it(0).
Note
Use this function with integer data types, otherwise it produces undefined behaviour.
36{
37 static_assert(std::is_integral<Integer>::value, "Integral required");
38 srsran_assert(sizeof(bitmap) * 8 > bit, "Requested bit ({}), exceeds the bitmap size({})", bit, sizeof(bitmap) * 8);
39
40 if (enable) {
41 bitmap |= (1U << bit);
42 } else {
43 bitmap &= ~(1U << bit);
44 }
45}

◆ set_slot_numerology()

slot_point srsran::set_slot_numerology ( slot_point sl,
unsigned new_numerology )
inline

Convert a slot point to another numerology. This function applies a "floor" operation when the new numerology is lower than the old one. E.g. Given two numerologies mu1 and mu2, where m1 < m2, this conversion function "f" will always ensure that, for a slot t1 with m1 numerology, the condition "f(f(t1, mu2), m1) <= t1" is satisfied.

284{
285 unsigned old_numerology = sl.numerology();
286 if (old_numerology > new_numerology) {
287 return slot_point{new_numerology, sl.to_uint() >> (old_numerology - new_numerology)};
288 }
289 if (old_numerology < new_numerology) {
290 return slot_point{new_numerology, sl.to_uint() << (new_numerology - old_numerology)};
291 }
292 return sl;
293}
constexpr uint32_t numerology() const
Numerology index (0..4).
Definition slot_point.h:108

◆ sib1_rtx_periodicity_to_value()

unsigned srsran::sib1_rtx_periodicity_to_value ( sib1_rtx_periodicity periodicity)
inline

Converts the SIB1 periodicity property to its corresponding value in milliseconds.

33{
34 return static_cast<unsigned>(periodicity);
35}

◆ sliv_from_s_and_l()

constexpr unsigned srsran::sliv_from_s_and_l ( unsigned N,
unsigned S,
unsigned L )
inlineconstexpr

Convert start S and length L into SLIV.

Parameters
[in]NMax length.
[out]SStart symbols.
[out]LLength.
Returns
An index giving a combination (jointly encoded) of start symbols and length indicator (SLIV).
34{
35 if ((L - 1) <= N / 2) {
36 return N * (L - 1) + S;
37 }
38 return N * (N - L + 1) + (N - 1 - S);
39}

◆ sliv_to_ofdm_symbols()

ofdm_symbol_range srsran::sliv_to_ofdm_symbols ( uint32_t sliv)
inline

Converts SLIV to OFDM symbol start S and length L.

Parameters
[in]slivAn index giving a combination (jointly encoded) of start symbols and length indicator (SLIV).
[out]symbolsSymbol interval as [S, S+L).
40{
41 uint8_t symbol_S, symbol_L;
42 sliv_to_s_and_l(NOF_OFDM_SYM_PER_SLOT_NORMAL_CP, sliv, symbol_S, symbol_L);
43 return {symbol_S, symbol_S + symbol_L};
44}

◆ sliv_to_s_and_l()

template<typename Integer >
constexpr void srsran::sliv_to_s_and_l ( unsigned N,
unsigned sliv,
Integer & S,
Integer & L )
inlineconstexpr

Convert SLIV to start S and length L.

Parameters
[in]NMax length.
[in]slivAn index giving a combination (jointly encoded) of start and length indicator (SLIV).
[out]SStart.
[out]LLength.
15{
16 static_assert(std::is_integral<Integer>::value, "Non-integer type passed as S + L output.");
17 unsigned low = sliv % N;
18 unsigned high = sliv / N;
19 if (high + 1 + low <= N) {
20 S = low;
21 L = high + 1;
22 } else {
23 S = N - 1 - low;
24 L = N - high + 1;
25 }
26}

◆ snssai_to_e1ap_asn1()

asn1::e1ap::snssai_s srsran::snssai_to_e1ap_asn1 ( srsran::s_nssai_t snssai)
inline

Convert s_nssai_t type to E1AP ASN1 s-NSSAI.

Parameters
snssaiThe s-NSSAI type.
Returns
The E1AP ASN.1 object where the result of the conversion is stored.
158{
159 asn1::e1ap::snssai_s asn1_snssai;
160 asn1_snssai.sst.from_number(snssai.sst);
161 if (snssai.sd.has_value()) {
162 asn1_snssai.sd_present = true;
163 asn1_snssai.sd.from_number(snssai.sd.value());
164 }
165
166 return asn1_snssai;
167}
Definition e1ap_ies.h:2782

◆ sock_type_to_str()

std::string srsran::sock_type_to_str ( int type)
inline
143{
144 switch (type) {
145 case SOCK_STREAM:
146 return "SOCK_STREAM";
147 case SOCK_DGRAM:
148 return "SOCK_DGRAM";
149 case SOCK_RAW:
150 return "SOCK_RAW";
151 case SOCK_RDM:
152 return "SOCK_RDM";
153 case SOCK_SEQPACKET:
154 return "SOCK_SEQPACKET";
155 case SOCK_DCCP:
156 return "SOCK_DCCP";
157 case SOCK_PACKET:
158 return "SOCK_PACKET";
159 }
160 return "unknown type";
161}

◆ sockaddr_to_ip_str()

bool srsran::sockaddr_to_ip_str ( const sockaddr * addr,
std::string & ip_address,
srslog::basic_logger & logger )
inline
120{
121 char addr_str[INET6_ADDRSTRLEN] = {};
122 if (addr->sa_family == AF_INET) {
123 if (inet_ntop(AF_INET, &((sockaddr_in*)addr)->sin_addr, addr_str, INET6_ADDRSTRLEN) == nullptr) {
124 logger.error("Could not convert sockaddr_in to string. errno={}", strerror(errno));
125 return false;
126 }
127 } else if (addr->sa_family == AF_INET6) {
128 if (inet_ntop(AF_INET6, &((sockaddr_in6*)addr)->sin6_addr, addr_str, INET6_ADDRSTRLEN) == nullptr) {
129 logger.error("Could not convert sockaddr_in6 to string. errno={}", strerror(errno));
130 return false;
131 }
132 } else {
133 logger.error("Unhandled address family.");
134 return false;
135 }
136
137 ip_address = addr_str;
138 logger.debug("Read bind port of UDP network gateway: {}", ip_address);
139 return true;
140}

◆ sr_nof_bits_to_uint()

unsigned srsran::sr_nof_bits_to_uint ( sr_nof_bits sr_bits)
inline

Converts sr_nof_bits into unsigned.

40{
41 return static_cast<unsigned>(sr_bits);
42}

◆ sr_periodicity_to_slot()

unsigned srsran::sr_periodicity_to_slot ( sr_periodicity period)
inline

Convert unsigned to scheduling_request_id.

66{
67 if (period == sr_periodicity::sym_2 or period == sr_periodicity::sym_6_or_7) {
68 return static_cast<unsigned>(sr_periodicity::sl_1);
69 }
70 return static_cast<unsigned>(period);
71}

◆ srb_id_to_lcid()

lcid_t srsran::srb_id_to_lcid ( srb_id_t srb_id)
inline

Convert SRB ID to LCID.

83{
84 return static_cast<lcid_t>(srb_id);
85}
lcid_t
Logical Channel Identity used to associate one logical channel to the corresponding RLC bearer....
Definition lcid.h:32

◆ srb_id_to_string()

const char * srsran::srb_id_to_string ( srb_id_t srb_id)
inline
88{
89 constexpr static const char* names[] = {"SRB0", "SRB1", "SRB2", "SRB3", "invalid"};
90 return names[srb_id_to_uint(srb_id < srb_id_t::nulltype ? srb_id : srb_id_t::nulltype)];
91}

◆ srb_id_to_uint()

constexpr uint16_t srsran::srb_id_to_uint ( srb_id_t id)
inlineconstexpr
57{
58 return static_cast<uint16_t>(id);
59}

◆ srs_configuration_get()

optional< srs_configuration > srsran::srs_configuration_get ( uint8_t c_srs,
uint8_t b_srs )

Gets an SRS configuration.

Parameters
[in]c_srsParameter $C_{SRS}$ contained in the higher-layer parameter freqHopping (see TS38.331 Section 6.3.2, Information Element SRS-Config).
[in]b_srsParameter $B_{SRS}$ contained in the higher-layer parameter freqHopping (see TS38.331 Section 6.3.2, Information Element SRS-Config).
Returns
A valid SRS configuration if the provided arguments are valid, otherwise nullopt.
65{
67
68 switch (b_srs) {
69 case 0:
70 table = table0;
71 break;
72 case 1:
73 table = table1;
74 break;
75 case 2:
76 table = table2;
77 break;
78 case 3:
79 table = table3;
80 break;
81 }
82 if (c_srs < table.size()) {
83 return table[c_srs];
84 }
85
86 return nullopt;
87}

◆ srsran_terminate()

template<typename... Args>
bool srsran::srsran_terminate ( const char * fmt,
Args &&... args )
inlinenoexcept

Command to terminate application with an error message, ensuring first that the log is flushed. Attribute noinline is used to signal to the compiler that this path should rarely occur and therefore doesn't need to get optimized.

35{
36 srslog::flush();
37 ::fflush(stdout);
38 fmt::print(stderr, fmt, std::forward<Args>(args)...);
39 std::abort();
40}

◆ ssb_get_k_first()

unsigned srsran::ssb_get_k_first ( frequency_range fr,
subcarrier_spacing ssb_scs,
subcarrier_spacing common_scs,
ssb_offset_to_pointA offset_to_pointA,
ssb_subcarrier_offset subcarrier_offset )
inline

Calculates the position of the first SS/PBCH block subcarrier relative to Point A.

The result is expressed in units of subcarriers of SS/PBCH block SCS ssb_scs assuming that:

  • the lowest subcarrier of the resource grid overlaps with Point A, and
  • the resource grid SCS matches the SS/PBCH block SCS.

In other words, it is not possible to determine an SS/PBCH block position in the grid if the SS/PBCH block subcarrier offset does not match the position of the resource grid subcarriers. Because of this, the parameters must result in an integer subcarrier index of the SS/PBCH block SCS.

Assertions are triggered if:

  • the provided SS/PBCH SCS and frequency range combination is invalid, or
  • the result would point to a non-integer subcarrier index.
Parameters
[in]frFrequency range.
[in]ssb_scsSS/PBCH block subcarrier spacing.
[in]common_scsHigher layer parameter subCarrierSpacingCommon as per TS38.331 MIB.
[in]offset_to_pointAOffset to Point A (see here for more information).
[in]subcarrier_offsetSubcarrier offset (see here for more information).
Returns
The index of the lowest subcarrier of the SS/PBCH block.
121{
122 // Verify the SCS are valid for the frequency range.
123 srsran_assert(is_scs_valid(ssb_scs, fr),
124 "Unsupported combination of FR{} and SSB SCS {}kHz.",
125 fr == frequency_range::FR1 ? 1 : 2,
126 scs_to_khz(ssb_scs));
127 srsran_assert(is_scs_valid(common_scs, fr),
128 "Unsupported combination of FR{} and Common SCS {}kHz.",
129 fr == frequency_range::FR1 ? 1 : 2,
130 scs_to_khz(common_scs));
131
132 // Verify the offset to Point A and the subcarrier offset are valid.
133 srsran_assert(offset_to_pointA.valid(),
134 "Invalid offset to Point A {} (max {})",
135 offset_to_pointA.to_uint(),
136 ssb_offset_to_pointA::max());
137 srsran_assert(subcarrier_offset.is_valid(fr),
138 "Invalid subcarrier offset {} for FR{} (max {})",
139 subcarrier_offset.to_uint(),
140 fr == frequency_range::FR1 ? 1 : 2,
142
143 // Select Point A offset SCS depending on the frequency range and convert SCS to kHz.
144 unsigned pointA_offset_scs_kHz =
145 scs_to_khz((fr == frequency_range::FR1) ? subcarrier_spacing::kHz15 : subcarrier_spacing::kHz60);
146
147 // Select the subcarrier offset SCS depending on the frequency range and convert it to kHz.
148 unsigned subcarrier_offset_scs_kHz =
149 scs_to_khz((fr == frequency_range::FR1) ? subcarrier_spacing::kHz15 : common_scs);
150
151 // SS/PBCH block SCS in kHz.
152 unsigned ssb_scs_kHz = scs_to_khz(ssb_scs);
153
154 // Calculate the number of 15kHz subcarriers from point A to the first subcarrier of the SS/PBCH block.
155 unsigned k_first_15kHz = (offset_to_pointA.to_uint() * NRE * pointA_offset_scs_kHz +
156 subcarrier_offset.to_uint() * subcarrier_offset_scs_kHz) /
157 15;
158
159 // Make sure the above conversion is exact and has no remainder.
160 srsran_assert((k_first_15kHz * 15) % ssb_scs_kHz == 0,
161 "Unsupported combination of FR{}, SSB SCS {}kHz, Common SCS {}kHz, offsetToPointA {} and "
162 "ssb-SubcarrierOffset {}.",
163 fr == frequency_range::FR1 ? 1 : 2,
164 ssb_scs_kHz,
165 scs_to_khz(common_scs),
166 offset_to_pointA.to_uint(),
167 subcarrier_offset.to_uint());
168
169 // Calculate actual result.
170 return (k_first_15kHz * 15) / ssb_scs_kHz;
171}
constexpr bool valid() const
Checks whether the value is within the defined boundaries.
Definition bounded_integer.h:80
Data type used to represent the offset from subcarrier zero in common resource block to subcarrier z...
Definition ssb_properties.h:154
bool is_valid(frequency_range fr) const
Returns true if the value is within the range.
Definition ssb_properties.h:177

◆ ssb_get_l_first()

unsigned srsran::ssb_get_l_first ( ssb_pattern_case pattern_case,
unsigned ssb_idx )
inline

Calculates the first OFDM symbol in a 5ms SS/PBCH block burst.

Parameters
[in]pattern_caseProvides the pattern
[in]ssb_idxProvides the SS/PBCH block opportunity index
Returns
the first OFDM symbol index in a half-frame
43{
44 // Case A - 15 kHz SCS: the first symbols of the candidate SS/PBCH blocks have indexes of { 2 , 8 } + 14 ⋅ n . For
45 // carrier frequencies smaller than or equal to 3 GHz, n = 0 , 1 . For carrier frequencies within FR1 larger than 3
46 // GHz, n = 0 , 1 , 2 , 3 .
47 if (pattern_case == ssb_pattern_case::A) {
48 constexpr std::array<unsigned, 2> first_symbols = {2, 8};
49 return first_symbols[ssb_idx % first_symbols.size()] + 14 * (ssb_idx / first_symbols.size());
50 }
51
52 // Case B - 30 kHz SCS: the first symbols of the candidate SS/PBCH blocks have indexes { 4 , 8 , 16 , 20 } + 28 ⋅ n .
53 // For carrier frequencies smaller than or equal to 3 GHz, n = 0 . For carrier frequencies within FR1 larger than 3
54 // GHz, n = 0 , 1 .
55 if (pattern_case == ssb_pattern_case::B) {
56 constexpr std::array<unsigned, 4> first_symbols = {4, 8, 16, 20};
57 return first_symbols[ssb_idx % first_symbols.size()] + 28 * (ssb_idx / first_symbols.size());
58 }
59
60 // Case C - 30 kHz SCS: the first symbols of the candidate SS/PBCH blocks have indexes { 2 , 8 } + 14 ⋅ n .
61 // - For paired spectrum operation
62 // For carrier frequencies smaller than or equal to 3 GHz, n = 0 , 1 . For carrier frequencies within FR1 larger
63 // than 3 GHz, n = 0 , 1 , 2 , 3 .
64 // - For unpaired spectrum operation
65 // For carrier frequencies smaller than 1.88 GHz, n = 0 , 1 . For carrier frequencies within FR1 equal to or
66 // larger than 1.88 GHz, n = 0 , 1 , 2 , 3 .
67 if (pattern_case == ssb_pattern_case::C) {
68 constexpr std::array<unsigned, 2> first_symbols = {2, 8};
69 return first_symbols[ssb_idx % first_symbols.size()] + 14 * (ssb_idx / first_symbols.size());
70 }
71
72 // Case D - 120 kHz SCS: the first symbols of the candidate SS/PBCH blocks have indexes { 4 , 8 , 16 , 20 } + 28 ⋅ n .
73 // For carrier frequencies within FR2, n = 0 , 1 , 2 , 3 , 5 , 6 , 7 , 8 , 10 , 11 , 12 , 13 , 15 , 16 , 17 , 18 .
74 if (pattern_case == ssb_pattern_case::D) {
75 constexpr std::array<unsigned, 4> first_symbols = {4, 8, 16, 20};
76 constexpr std::array<unsigned, 16> n = {0, 1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18};
77 srsran_assert(ssb_idx < first_symbols.size() * n.size(), "SSB index out of range.");
78 return first_symbols[ssb_idx % first_symbols.size()] + 28 * n[ssb_idx / first_symbols.size()];
79 }
80
81 // Case E - 240 kHz SCS: the first symbols of the candidate SS/PBCH blocks have indexes
82 //{ 8 , 12 , 16 , 20 , 32 , 36 , 40 , 44 } + 56 ⋅ n . For carrier frequencies within FR2, n = 0 , 1 , 2 , 3 , 5 , 6 ,
83 // 7 , 8 .
84 if (pattern_case == ssb_pattern_case::E) {
85 constexpr std::array<unsigned, 8> first_symbols = {8, 12, 16, 20, 32, 36, 40, 44};
86 constexpr std::array<unsigned, 16> n = {0, 1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18};
87 srsran_assert(ssb_idx < first_symbols.size() * n.size(), "SSB index out of range.");
88 return first_symbols[ssb_idx % first_symbols.size()] + 56 * n[ssb_idx / first_symbols.size()];
89 }
90
91 // Impossible!
92 srsran_assert(false, "Invalid SSB pattern case");
93 return {};
94}

◆ ssb_get_L_max()

uint8_t srsran::ssb_get_L_max ( subcarrier_spacing ssb_scs,
unsigned dl_arfcn,
optional< nr_band > band = {} )

Calculates L_max, ie max number of SSB occasions per SSB period. Possible values are {4, 8, 64}.

Remarks
See TS 38.213, Section 4.1.
Parameters
ssb_scsSSB Subcarrier Spacing.
dl_arfcnDL ARFCN.
bandNR band. If not provided, it will be derived from the DL-ARFCN.
Returns
L_max value.
38{
39 uint8_t L_max = 0;
40
41 // Derive the SSB-specific parameters (SSB pattern case, SSB L_max and SSB paired_spectrum flag) from those in the
42 // MAC Cell config.
43 if (not band.has_value()) {
44 band.emplace(band_helper::get_band_from_dl_arfcn(dl_arfcn));
45 srsran_assert(band.value() != nr_band::invalid, "Invalid NR band index");
46 }
47 ssb_pattern_case ssb_case = band_helper::get_ssb_pattern(band.value(), ssb_scs);
48 // Flag indicating whether cell is on paired spectrum (FDD) or unpaired (TDD, SDL, SUL).
49 bool paired_spectrum = band_helper::is_paired_spectrum(band.value());
50
51 // Get L_max from SSB pattern case and carrier frequency and paired spectrum flag.
52 uint32_t f_arfcn = dl_arfcn;
53 if (ssb_case == ssb_pattern_case::A or ssb_case == ssb_pattern_case::B) {
54 // See TS 38.311, Section 4.1, "Case A" and "Case B".
55 L_max = f_arfcn < CUTOFF_FREQ_ARFCN_CASE_A_B_C ? 4 : 8;
56 } else if (ssb_case == ssb_pattern_case::C) {
57 // See TS 38.311, Section 4.1, "Case C".
59 L_max = f_arfcn < ssb_cutoff_freq ? 4 : 8;
60 } else {
61 srsran_assert(ssb_case < ssb_pattern_case::invalid, "Invalid SSB case");
62 }
63
64 return L_max;
65}
const unsigned CUTOFF_FREQ_ARFCN_CASE_A_B_C
The cutoff frequency for case A, B and C paired is 3GHz, corresponding to 600000 ARFCN (TS 38....
Definition sched_consts.h:37
ssb_pattern_case
Labels for the different SS/PBCH block patterns defined in TS38.213 Section 4.1.
Definition ssb_properties.h:45
const unsigned CUTOFF_FREQ_ARFCN_CASE_C_UNPAIRED
The cutoff frequency for case C unpaired is 1.88GHz, corresponding to 376000 ARFCN (TS 38....
Definition sched_consts.h:39

◆ ssb_get_ssb_pattern()

ssb_pattern_case srsran::ssb_get_ssb_pattern ( subcarrier_spacing ssb_scs,
unsigned dl_arfcn )

Calculates SSB pattern from SSB subcarrier spacing and DL ARFCN.

31{
32 nr_band dl_idx_nr_band = band_helper::get_band_from_dl_arfcn(dl_arfcn);
33 srsran_assert(dl_idx_nr_band != nr_band::invalid, "Invalid NR band index");
34 return band_helper::get_ssb_pattern(dl_idx_nr_band, ssb_scs);
35}

◆ ssb_periodicity_to_value()

unsigned srsran::ssb_periodicity_to_value ( ssb_periodicity periodicity)
inline

Converts the SSB periodicity property to its corresponding value in milliseconds.

37{
38 return static_cast<unsigned>(periodicity);
39}

◆ string_parse_list()

template<class Insertable >
void srsran::string_parse_list ( const std::string & input,
char delimiter,
Insertable & list )
inline

Splits a given string into multiple elements given a delimiter. The elements are casted to the specified type. Insertable It is the list data-type. It needs to implement insert(iterator, element)

Parameters
inputIt is the input string
delimiterCharacter used for indicating the end of the strings
listcontains the parsed values
36{
37 std::stringstream ss(input);
38
39 // Removes all possible elements of the list
40 list.clear();
41
42 while (ss.good()) {
43 std::string substr;
44 std::getline(ss, substr, delimiter);
45
46 if (not substr.empty()) {
47 list.insert(list.end(), substr);
48 }
49 }
50}

◆ string_to_mcc()

bool srsran::string_to_mcc ( std::string str,
uint16_t * mcc )
inline

Convert between string and BCD-coded MCC. Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xf. MCC 001 results in 0xf001

35{
36 uint32_t len = (uint32_t)str.size();
37 if (len != 3) {
38 return false;
39 }
40 if (!isdigit(str[0]) || !isdigit(str[1]) || !isdigit(str[2])) {
41 return false;
42 }
43 *mcc = 0xf000;
44 *mcc |= ((uint8_t)(str[0] - '0') << 8);
45 *mcc |= ((uint8_t)(str[1] - '0') << 4);
46 *mcc |= ((uint8_t)(str[2] - '0'));
47 return true;
48}

◆ string_to_mnc()

bool srsran::string_to_mnc ( std::string str,
uint16_t * mnc )
inline

Convert between string and BCD-coded MNC. Digits are represented by 4-bit nibbles. Unused nibbles are filled with 0xf. MNC 001 results in 0xf001 MNC 01 results in 0xff01

101{
102 uint32_t len = str.size();
103 if (len != 3 && len != 2) {
104 return false;
105 }
106 if (len == 3) {
107 if (!isdigit(str[0]) || !isdigit(str[1]) || !isdigit(str[2])) {
108 return false;
109 }
110 *mnc = 0xf000;
111 *mnc |= ((uint8_t)(str[0] - '0') << 8);
112 *mnc |= ((uint8_t)(str[1] - '0') << 4);
113 *mnc |= ((uint8_t)(str[2] - '0'));
114 }
115 if (len == 2) {
116 if (!isdigit(str[0]) || !isdigit(str[1])) {
117 return false;
118 }
119 *mnc = 0xff00;
120 *mnc |= ((uint8_t)(str[0] - '0') << 4);
121 *mnc |= ((uint8_t)(str[1] - '0'));
122 }
123
124 return true;
125}

◆ tbs_calculator_calculate()

unsigned srsran::tbs_calculator_calculate ( const tbs_calculator_configuration & config)

Calculates the TBS for a given SCH transmission.

Implemented as per TS38.214 Section 5.1.3.2.

Returns
The TBS in bits.
125{
126 static constexpr unsigned NOF_SC_RB = NOF_SUBCARRIERS_PER_RB;
127
128 // Step 1. determine the number of REs within the slot.
129 unsigned nof_re_prime = NOF_SC_RB * config.nof_symb_sh - config.nof_dmrs_prb - config.nof_oh_prb;
130 unsigned nof_re = std::min(nof_re_prime, 156U) * config.n_prb;
131
133
134 srsran_assert(config.mcs_descr.modulation > modulation_scheme::BPSK,
135 "Modulation scheme should be QPSK or higher, provided {}.",
136 config.mcs_descr.modulation);
137
138 // Step 2. Intermediate number of information bits.
139 return tbs_calculator_step2(scaling,
140 nof_re,
143 config.nof_layers);
144}
sch_mcs_description mcs_descr
Modulation and coding scheme for the SCH transmission.
Definition tbs_calculator.h:72
unsigned nof_oh_prb
Number of REs configured as overhead.
Definition tbs_calculator.h:63
unsigned tb_scaling_field
TB scaling field.
Definition tbs_calculator.h:89
unsigned nof_layers
Number of layers.
Definition tbs_calculator.h:80
unsigned nof_dmrs_prb
Number of REs for DM-RS per PRB in the allocated duration.
Definition tbs_calculator.h:47
unsigned n_prb
Total number of PRBs allocated to the UE.
Definition tbs_calculator.h:93

◆ tbs_calculator_pdsch_get_scaling_factor()

float srsran::tbs_calculator_pdsch_get_scaling_factor ( unsigned scaling)

Converts TB scaling field into the scaling factor S (see TS38.214 Table 5.1.3.2-2).

Parameters
[in]scalingTB scaling field, possible values are {0, 1, 2}.
Returns
Scaling factor S.
78{
79 srsran_assert(scaling < 3, "Invalid scaling value ({}, max 2).", scaling);
80 return 1.0F / static_cast<float>(pow2(scaling));
81}

◆ tbs_calculator_table_find_smallest_not_less_than()

unsigned srsran::tbs_calculator_table_find_smallest_not_less_than ( unsigned nof_info_prime)

Gets the smallest TBS in bits (from TS 38.214 Table 5.1.3.2-1) greater than or equal to a given value.

Parameters
[in]nof_info_primeQuantized intermediate number of information bits, as per TS38.214 Section 5.1.3.2.
Remarks
nof_info_prime must not be greater than 3824 bits.
Returns
The smallest TBS from TS38.214 Table 5.1.3.2-1 that is greater than or equal to nof_info_prime.
84{
85 // LUT indexed by nof_info_prime in bytes based on TS38.214 Table 5.1.3.2-1 where the contents are the smallest not
86 // less than nof_info_prime.
87 static const std::array<uint16_t, 479> table_valid_tbs = {
88 24, 24, 24, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144,
89 152, 160, 168, 176, 184, 192, 208, 208, 224, 224, 240, 240, 256, 256, 272, 272, 288, 288, 304,
90 304, 320, 320, 336, 336, 352, 352, 368, 368, 384, 384, 408, 408, 408, 432, 432, 432, 456, 456,
91 456, 480, 480, 480, 504, 504, 504, 528, 528, 528, 552, 552, 552, 576, 576, 576, 608, 608, 608,
92 608, 640, 640, 640, 640, 672, 672, 672, 672, 704, 704, 704, 704, 736, 736, 736, 736, 768, 768,
93 768, 768, 808, 808, 808, 808, 808, 848, 848, 848, 848, 848, 888, 888, 888, 888, 888, 928, 928,
94 928, 928, 928, 984, 984, 984, 984, 984, 984, 984, 1032, 1032, 1032, 1032, 1032, 1032, 1064, 1064, 1064,
95 1064, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1160, 1160, 1160, 1160, 1192, 1192, 1192, 1192, 1224, 1224,
96 1224, 1224, 1256, 1256, 1256, 1256, 1288, 1288, 1288, 1288, 1320, 1320, 1320, 1320, 1352, 1352, 1352, 1352, 1416,
97 1416, 1416, 1416, 1416, 1416, 1416, 1416, 1480, 1480, 1480, 1480, 1480, 1480, 1480, 1480, 1544, 1544, 1544, 1544,
98 1544, 1544, 1544, 1544, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1672, 1672, 1672, 1672, 1672, 1672, 1672,
99 1672, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1736, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1864, 1864,
100 1864, 1864, 1864, 1864, 1864, 1864, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 2024, 2024, 2024, 2024, 2024,
101 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2088, 2088, 2088, 2088, 2088, 2088, 2088, 2088, 2152, 2152, 2152, 2152,
102 2152, 2152, 2152, 2152, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2280, 2280, 2280, 2280, 2280, 2280, 2280,
103 2280, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2472, 2472,
104 2472, 2472, 2472, 2472, 2472, 2472, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2600, 2600, 2600, 2600, 2600,
105 2600, 2600, 2600, 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728,
106 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2856, 2856, 2856, 2856, 2856, 2856, 2856, 2856, 2976, 2976, 2976,
107 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 3104, 3104, 3104, 3104, 3104, 3104, 3104,
108 3104, 3104, 3104, 3104, 3104, 3104, 3104, 3104, 3104, 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3240,
109 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368, 3368,
110 3368, 3368, 3368, 3368, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496, 3496,
111 3496, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3752, 3752,
112 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3752, 3824, 3824, 3824, 3824, 3824,
113 3824, 3824, 3824, 3824};
114
115 unsigned index = divide_ceil(nof_info_prime, 8);
116 srsran_assert(index < table_valid_tbs.size(),
117 "The number of information bits exceeds {} the maximum {}.",
119 3824);
120
121 return table_valid_tbs[index];
122}

◆ this_thread_name()

const char * srsran::this_thread_name ( )

Get caller thread name.

Storage of current thread name, set via unique_thread.

255{
257 thread_local std::string this_thread_name_val = compute_this_thread_name();
258 return this_thread_name_val.c_str();
259}

◆ time_alignment_timer_to_value()

std::underlying_type< time_alignment_timer >::type srsran::time_alignment_timer_to_value ( time_alignment_timer timer)
inline

Return the value of time_alignment_timer.

53{
54 return static_cast<std::underlying_type<time_alignment_timer>::type>(timer);
55}

◆ to_affinity_mask_policy()

gnb_sched_affinity_mask_policy srsran::to_affinity_mask_policy ( const std::string & value)
inline

Converts the given sting into an affinity mask policy or returns last if it could not convert it.

43{
44 if (value == "round-robin") {
45 return gnb_sched_affinity_mask_policy::round_robin;
46 }
47 if (value == "mask") {
48 return gnb_sched_affinity_mask_policy::mask;
49 }
50
51 return gnb_sched_affinity_mask_policy::last;
52}

◆ to_affinity_mask_type()

gnb_sched_affinity_mask_types srsran::to_affinity_mask_type ( unsigned value)
inline

Converts and returns the given value to an affinity mask type.

62{
63 return static_cast<gnb_sched_affinity_mask_types>(value);
64}
gnb_sched_affinity_mask_types
Types of CPU affinity masks in the gNB.
Definition gnb_os_sched_affinity_manager.h:30

◆ to_aggregation_level_index()

unsigned srsran::to_aggregation_level_index ( aggregation_level lvl)
inline

Calculates the index associated to the passed aggregation level.

44{
45 return static_cast<unsigned>(lvl);
46}

◆ to_array() [1/2]

template<class T , std::size_t N>
constexpr std::array< std::remove_cv_t< T >, N > srsran::to_array ( T(&&) a[N])
constexpr
32{
33 return detail::to_array_impl(std::move(a), std::make_index_sequence<N>{});
34}

◆ to_array() [2/2]

template<class T , std::size_t N>
constexpr std::array< std::remove_cv_t< T >, N > srsran::to_array ( T(&) a[N])
constexpr

Helper method to generate an std::array from a C array without needing to derive the size N.

27{
28 return detail::to_array_impl(a, std::make_index_sequence<N>{});
29}

◆ to_bucket_size_duration()

bucket_size_duration srsran::to_bucket_size_duration ( unsigned bsd)
inline

Returns the bucket_size_duration enum value corresponding to the given unsigned value.

114{
115 switch (bsd) {
116 case 5:
117 return bucket_size_duration::ms5;
118 case 10:
119 return bucket_size_duration::ms10;
120 case 20:
121 return bucket_size_duration::ms20;
122 case 50:
123 return bucket_size_duration::ms50;
124 case 100:
125 return bucket_size_duration::ms100;
126 case 150:
127 return bucket_size_duration::ms150;
128 case 300:
129 return bucket_size_duration::ms300;
130 case 500:
131 return bucket_size_duration::ms500;
132 case 1000:
133 return bucket_size_duration::ms1000;
134 default:
135 report_fatal_error("Invalid bucketSizeDuration value={}", bsd);
136 }
137}

◆ to_bwp_id()

constexpr bwp_id_t srsran::to_bwp_id ( std::underlying_type_t< bwp_id_t > value)
inlineconstexpr

Converts integer value to BWP-Id".

65{
66 return static_cast<bwp_id_t>(value);
67}
bwp_id_t
Definition bwp_configuration.h:61

◆ to_c_str()

template<size_t N>
const char * srsran::to_c_str ( fmt::basic_memory_buffer< char, N > & mem_buffer)

Converts fmt memoryy buffer to c_str() without the need for conversion to intermediate std::string.

32{
33 mem_buffer.push_back('\0');
34 return mem_buffer.data();
35}

◆ to_cf() [1/3]

cf_t srsran::to_cf ( cf_t value)
inline
63{
64 return value;
65}

◆ to_cf() [2/3]

cf_t srsran::to_cf ( ci16_t value)
inline
68{
69 return detail::convert<int16_t, float>(value);
70}

◆ to_cf() [3/3]

cf_t srsran::to_cf ( ci8_t value)
inline
58{
59 return detail::convert<int8_t, float>(value);
60}

◆ to_ci16()

ci16_t srsran::to_ci16 ( cf_t value)
inline
53{
54 return detail::convert<float, int16_t>(value);
55}

◆ to_ci8()

ci8_t srsran::to_ci8 ( cf_t value)
inline
48{
49 return detail::convert<float, int8_t>(value);
50}

◆ to_coreset_id()

constexpr coreset_id srsran::to_coreset_id ( unsigned cs_id)
inlineconstexpr
46{
47 return static_cast<coreset_id>(cs_id);
48}
coreset_id
CORESET identifier. This value is UE-specific, which means that a UE can have up to "maxNrofControlRe...
Definition coreset.h:43

◆ to_du_cell_index()

du_cell_index_t srsran::to_du_cell_index ( std::underlying_type_t< du_cell_index_t > idx)
inline

Convert integer to DU cell index type.

60{
61 return static_cast<du_cell_index_t>(idx);
62}
du_cell_index_t
Maximum number of cells supported by DU (implementation-defined).
Definition du_types.h:40

◆ to_du_ue_index()

constexpr du_ue_index_t srsran::to_du_ue_index ( std::underlying_type_t< du_ue_index_t > idx)
inlineconstexpr

Convert integer to DU UE index type.

49{
50 return static_cast<du_ue_index_t>(idx);
51}
du_ue_index_t
Maximum number of UEs supported by DU (implementation-defined).
Definition du_types.h:32

◆ to_frequency_range()

frequency_range srsran::to_frequency_range ( ssb_pattern_case pattern_case)
inline

Returns the frequency range corresponding to an SS/PBCH block pattern.

101{
102 srsran_assert(pattern_case != ssb_pattern_case::invalid, "Invalid pattern case.");
103
104 if (pattern_case < ssb_pattern_case::D) {
105 return frequency_range::FR1;
106 }
107 return frequency_range::FR2;
108}

◆ to_harq_id()

constexpr harq_id_t srsran::to_harq_id ( unsigned h_id)
inlineconstexpr
31{
32 return static_cast<harq_id_t>(h_id);
33}
harq_id_t
Identification of an HARQ process.
Definition harq_id.h:28

◆ to_lc_sr_delay_timer()

logical_channel_sr_delay_timer srsran::to_lc_sr_delay_timer ( unsigned timer_value)
inline

Return the enum value of logical_channel_sr_delay_timer corresponding to give value.

183{
184 switch (timer_value) {
185 case 20:
186 return logical_channel_sr_delay_timer::sf20;
187 case 40:
188 return logical_channel_sr_delay_timer::sf40;
189 case 64:
190 return logical_channel_sr_delay_timer::sf64;
191 case 128:
192 return logical_channel_sr_delay_timer::sf128;
193 case 512:
194 return logical_channel_sr_delay_timer::sf512;
195 case 1024:
196 return logical_channel_sr_delay_timer::sf1024;
197 case 2560:
198 return logical_channel_sr_delay_timer::sf2560;
199 default:
200 report_fatal_error("Invalid logicalChannelSR-DelayTimer value={}", timer_value);
201 }
202}

◆ to_max_code_rate_float()

float srsran::to_max_code_rate_float ( max_pucch_code_rate opt)
inline
61{
62 switch (opt) {
63 case max_pucch_code_rate::dot_08:
64 return 0.08f;
65 case max_pucch_code_rate::dot_15:
66 return 0.15f;
67 case max_pucch_code_rate::dot_25:
68 return 0.25f;
69 case max_pucch_code_rate::dot_35:
70 return 0.35f;
71 case max_pucch_code_rate::dot_45:
72 return 0.45f;
73 case max_pucch_code_rate::dot_60:
74 return 0.60f;
75 case max_pucch_code_rate::dot_80:
76 return 0.80f;
77 default:
78 break;
79 }
80 return 0;
81}

◆ to_nof_cces()

unsigned srsran::to_nof_cces ( aggregation_level lvl)
inline

Calculates number of CCEs based on Aggregation Level as per TS38.211 Table 7.3.2.1-1.

38{
39 return 1U << static_cast<uint8_t>(lvl);
40}

◆ to_nominal_rbg_size_value()

unsigned srsran::to_nominal_rbg_size_value ( nominal_rbg_size sz)
inline
43{
44 return static_cast<unsigned>(sz);
45}

◆ to_number() [1/7]

constexpr uint16_t srsran::to_number ( pdcp_control_pdu_type type)
constexpr
67{
68 return static_cast<uint16_t>(type);
69}

◆ to_number() [2/7]

constexpr unsigned srsran::to_number ( pdcp_dc_field dc)
constexpr
47{
48 return static_cast<unsigned>(dc);
49}

◆ to_number() [3/7]

constexpr uint16_t srsran::to_number ( rlc_am_sn_size sn_size)
constexpr

Converts sequence number field to numeric its value.

Parameters
sn_sizesequence number size
Returns
numeric value of the sequence number field
88{
89 return static_cast<uint16_t>(sn_size);
90}

◆ to_number() [4/7]

constexpr uint16_t srsran::to_number ( rlc_control_pdu_type type)
constexpr
666{
667 return static_cast<uint16_t>(type);
668}

◆ to_number() [5/7]

constexpr unsigned srsran::to_number ( rlc_dc_field dc)
constexpr
647{
648 return static_cast<unsigned>(dc);
649}

◆ to_number() [6/7]

constexpr uint16_t srsran::to_number ( rlc_si_field si_field)
constexpr
660{
661 return static_cast<uint16_t>(si_field);
662}

◆ to_number() [7/7]

constexpr uint16_t srsran::to_number ( rlc_um_sn_size sn_size)
constexpr
65{
66 return static_cast<uint16_t>(sn_size);
67}

◆ to_numerology_value() [1/2]

constexpr unsigned srsran::to_numerology_value ( prach_subcarrier_spacing ra_scs)
inlineconstexpr

Converts SCS to numerology index ( $\mu$).

75{
76 srsran_assert(
77 is_short_preamble(ra_scs), "RA subcarrier spacing (i.e., {}) must be for short preamble.", to_string(ra_scs));
78 return static_cast<unsigned>(ra_scs);
79}

◆ to_numerology_value() [2/2]

constexpr unsigned srsran::to_numerology_value ( subcarrier_spacing scs)
inlineconstexpr

Convert SCS to numerology index ( $\mu$).

51{
52 return static_cast<unsigned>(scs);
53}
Here is the caller graph for this function:

◆ to_periodic_bsr_timer()

periodic_bsr_timer srsran::to_periodic_bsr_timer ( unsigned timer_value)
inline

Return the enum value of periodic_bsr_timer corresponding to give value.

73{
74 switch (timer_value) {
75 case 1:
76 return periodic_bsr_timer::sf1;
77 case 5:
78 return periodic_bsr_timer::sf5;
79 case 10:
80 return periodic_bsr_timer::sf10;
81 case 16:
82 return periodic_bsr_timer::sf16;
83 case 20:
84 return periodic_bsr_timer::sf20;
85 case 32:
86 return periodic_bsr_timer::sf32;
87 case 40:
88 return periodic_bsr_timer::sf40;
89 case 64:
90 return periodic_bsr_timer::sf64;
91 case 80:
92 return periodic_bsr_timer::sf80;
93 case 128:
94 return periodic_bsr_timer::sf128;
95 case 160:
96 return periodic_bsr_timer::sf160;
97 case 320:
98 return periodic_bsr_timer::sf320;
99 case 640:
100 return periodic_bsr_timer::sf640;
101 case 1280:
102 return periodic_bsr_timer::sf1280;
103 case 2560:
104 return periodic_bsr_timer::sf2560;
105 case 0:
106 return periodic_bsr_timer::infinity;
107 default:
108 report_fatal_error("Invalid periodicBSR-Timer value={}", timer_value);
109 }
110}

◆ to_phr_prohibit_timer()

phr_prohibit_timer srsran::to_phr_prohibit_timer ( unsigned prohib_timer)
inline

Return the enum value of phr-ProhibitTimer corresponding to the given unsigned value.

67{
68 switch (prohib_timer) {
69 case 0:
70 return phr_prohibit_timer::sf0;
71 case 10:
72 return phr_prohibit_timer::sf10;
73 case 20:
74 return phr_prohibit_timer::sf20;
75 case 50:
76 return phr_prohibit_timer::sf50;
77 case 100:
78 return phr_prohibit_timer::sf100;
79 case 200:
80 return phr_prohibit_timer::sf200;
81 case 500:
82 return phr_prohibit_timer::sf500;
83 case 1000:
84 return phr_prohibit_timer::sf1000;
85 default:
86 report_fatal_error("Invalid phr-ProhibitTimer value={}", prohib_timer);
87 }
88}

◆ to_prach_format_type()

prach_format_type srsran::to_prach_format_type ( const char * string)
inline
88{
89 using int_type = std::underlying_type_t<prach_format_type>;
90 for (int_type i_format = static_cast<int_type>(prach_format_type::zero),
91 i_format_end = static_cast<int_type>(prach_format_type::invalid);
92 i_format != i_format_end;
93 ++i_format) {
94 prach_format_type format = static_cast<prach_format_type>(i_format);
95 if (strcmp(string, to_string(format)) == 0) {
96 return format;
97 }
98 }
99
100 return prach_format_type::invalid;
101}
prach_format_type
PRACH preamble formats.
Definition prach_format_type.h:31

◆ to_prioritized_bit_rate()

prioritized_bit_rate srsran::to_prioritized_bit_rate ( unsigned pbr)
inline

Returns the prioritized_bit_rate enum value corresponding to the given unsigned value.

53{
54 switch (pbr) {
55 case 0:
56 return prioritized_bit_rate::kBps0;
57 case 8:
58 return prioritized_bit_rate::kBps8;
59 case 16:
60 return prioritized_bit_rate::kBps16;
61 case 32:
62 return prioritized_bit_rate::kBps32;
63 case 64:
64 return prioritized_bit_rate::kBps64;
65 case 128:
66 return prioritized_bit_rate::kBps128;
67 case 256:
68 return prioritized_bit_rate::kBps256;
69 case 512:
70 return prioritized_bit_rate::kBps512;
71 case 1024:
72 return prioritized_bit_rate::kBps1024;
73 case 2048:
74 return prioritized_bit_rate::kBps2048;
75 case 4096:
76 return prioritized_bit_rate::kBps4096;
77 case 8192:
78 return prioritized_bit_rate::kBps8192;
79 case 16384:
80 return prioritized_bit_rate::kBps16384;
81 case 32768:
82 return prioritized_bit_rate::kBps32768;
83 case 65536:
84 return prioritized_bit_rate::kBps65536;
85 case 65537:
86 return prioritized_bit_rate::infinity;
87 default:
88 report_fatal_error("Invalid prioritisedBitRate value={}", pbr);
89 }
90}

◆ to_ra_subcarrier_spacing() [1/3]

prach_subcarrier_spacing srsran::to_ra_subcarrier_spacing ( const char * str)
inline

Converts a numeric string (representing a bandwidth in kilohertz) to an SCS.

132{
133 unsigned in_scs_Hz = static_cast<unsigned>(1e3F * std::strtof(str, nullptr));
134 return to_ra_subcarrier_spacing(in_scs_Hz);
135}

◆ to_ra_subcarrier_spacing() [2/3]

constexpr prach_subcarrier_spacing srsran::to_ra_subcarrier_spacing ( subcarrier_spacing scs)
inlineconstexpr

Adapts common resource grid subcarrier spacing to RA subcarrier spacing.

102{
103 // Convert to numerology.
104 unsigned numerology = to_numerology_value(scs);
105
106 // Check if the numerology exceeds the maximum for RA.
107 if (numerology > static_cast<unsigned>(prach_subcarrier_spacing::kHz120)) {
108 return prach_subcarrier_spacing::invalid;
109 }
110
111 // Convert to RA subcarrier spacing.
112 return static_cast<prach_subcarrier_spacing>(numerology);
113}

◆ to_ra_subcarrier_spacing() [3/3]

prach_subcarrier_spacing srsran::to_ra_subcarrier_spacing ( unsigned in_scs_Hz)
inline

Converts a numerical value (a bandwidth in hertz) to an SCS.

117{
118 for (unsigned index = 0, index_end = static_cast<unsigned>(prach_subcarrier_spacing::invalid); index != index_end;
119 ++index) {
120 prach_subcarrier_spacing scs = static_cast<prach_subcarrier_spacing>(index);
121 unsigned scs_Hz = ra_scs_to_Hz(scs);
122
123 if ((in_scs_Hz == scs_Hz) || (in_scs_Hz == scs_Hz * 1000)) {
124 return scs;
125 }
126 }
127 return prach_subcarrier_spacing::invalid;
128}
constexpr unsigned ra_scs_to_Hz(prach_subcarrier_spacing ra_scs)
Converts SCS to its integer value in hertz.
Definition prach_subcarrier_spacing.h:82

◆ to_retx_bsr_timer()

retx_bsr_timer srsran::to_retx_bsr_timer ( unsigned timer_value)
inline

Return the enum value of retx_bsr_timer corresponding to give value.

135{
136 switch (timer_value) {
137 case 10:
138 return retx_bsr_timer::sf10;
139 case 20:
140 return retx_bsr_timer::sf20;
141 case 40:
142 return retx_bsr_timer::sf40;
143 case 80:
144 return retx_bsr_timer::sf80;
145 case 160:
146 return retx_bsr_timer::sf160;
147 case 320:
148 return retx_bsr_timer::sf320;
149 case 640:
150 return retx_bsr_timer::sf640;
151 case 1280:
152 return retx_bsr_timer::sf1280;
153 case 2560:
154 return retx_bsr_timer::sf2560;
155 case 5120:
156 return retx_bsr_timer::sf5120;
157 case 10240:
158 return retx_bsr_timer::sf10240;
159 default:
160 report_fatal_error("Invalid retxBSR-Timer value={}", timer_value);
161 }
162}

◆ to_rnti()

constexpr rnti_t srsran::to_rnti ( std::underlying_type_t< rnti_t > number)
constexpr

Converts integer to RNTI value.

52{
53 return static_cast<rnti_t>(number);
54}
rnti_t
Definition rnti.h:32

◆ to_sampling_rate_Hz()

template<typename U = double>
constexpr U srsran::to_sampling_rate_Hz ( subcarrier_spacing scs,
unsigned dft_size )
inlineconstexpr

Gets the sampling rate from a subcarrier spacing and a DFT size combination.

Template Parameters
UReturn data type. Must be convertible to unsigned (default: double).
Parameters
[in]scsSubcarrier spacing.
dft_sizeDFT size.
Returns
The sampling rate in hertz from the given SCS and DFT size.
239{
240 static_assert(std::is_convertible<unsigned, U>::value, "Invalid type.");
241 return static_cast<U>(scs_to_khz(scs) * 1000 * dft_size);
242}

◆ to_search_space_id()

search_space_id srsran::to_search_space_id ( unsigned ss_id)
inline
43{
44 return static_cast<search_space_id>(ss_id);
45}
search_space_id
Search Space identifier. This value is UE-specific, which means that a UE can have up to "maxNrofSear...
Definition search_space.h:40

◆ to_serv_cell_index()

serv_cell_index_t srsran::to_serv_cell_index ( std::underlying_type_t< serv_cell_index_t > val)
inline
41{
42 return static_cast<serv_cell_index_t>(val);
43}
serv_cell_index_t
Definition serv_cell_index.h:32

◆ to_span()

span< const uint8_t > srsran::to_span ( const byte_buffer & src,
span< uint8_t > tmp_mem )
inline

Provides a contiguous view of a byte_buffer. It is bound to the lifetime of the byte_buffer src and the temporary buffer tmp_mem, whichever is shorter. Important: tmp_mem must be at least as large as src.

The memory used for the result and the complexity depends on whether src is contiguous or not:

  • Contiguous: Result is a view of the first and only segment of src.
  • Non-Contiguous: Result is a view of tmp_mem in which all segments of src are copied.
Parameters
srcSource byte_buffer.
tmp_memTemporary memory for a possible copy. Must be at least as large as src.
Returns
A contiguous view of the byte_buffer
692{
693 // empty buffer
694 if (src.empty()) {
695 return {};
696 }
697
698 // is contiguous: shortcut without copy
699 if (src.is_contiguous()) {
700 return *src.segments().begin();
701 }
702 // non-contiguous: copy required
703 srsran_assert(src.length() <= tmp_mem.size(),
704 "Insufficient temporary memory to fit the byte_buffer. buffer_size={}, tmp_size={}",
705 src.length(),
706 tmp_mem.size());
707 span<uint8_t> result = {tmp_mem.data(), src.length()};
708 copy_segments(src, result);
709 return result;
710}
byte_buffer_segment_span_range segments()
Returns a non-owning list of segments that compose the byte_buffer.
Definition byte_buffer.h:361
bool empty() const
Checks whether byte_buffer is empty.
Definition byte_buffer.h:327
bool is_contiguous() const
Test if byte buffer is contiguous in memory, i.e. it has only one segment.
Definition byte_buffer.h:352
size_t copy_segments(const ByteBufferType &src, span< uint8_t > dst)
Definition byte_buffer.h:663

◆ to_sr_max_tx()

sr_max_tx srsran::to_sr_max_tx ( unsigned max_tx)
inline

Return the enum value of sr-TransMax corresponding to the given unsigned value.

106{
107 switch (max_tx) {
108 case 4:
109 return sr_max_tx::n4;
110 case 8:
111 return sr_max_tx::n8;
112 case 16:
113 return sr_max_tx::n16;
114 case 32:
115 return sr_max_tx::n32;
116 case 64:
117 return sr_max_tx::n64;
118 default:
119 report_fatal_error("Invalid sr-TransMax value={}", max_tx);
120 }
121}

◆ to_sr_prohib_timer()

sr_prohib_timer srsran::to_sr_prohib_timer ( unsigned sr_prohibit_timer)
inline

Return the enum value of sr-ProhibitTimer corresponding to the given unsigned value.

78{
79 switch (sr_prohibit_timer) {
80 case 1:
81 return sr_prohib_timer::ms1;
82 case 2:
83 return sr_prohib_timer::ms2;
84 case 4:
85 return sr_prohib_timer::ms4;
86 case 8:
87 return sr_prohib_timer::ms8;
88 case 16:
89 return sr_prohib_timer::ms16;
90 case 32:
91 return sr_prohib_timer::ms32;
92 case 64:
93 return sr_prohib_timer::ms64;
94 case 128:
95 return sr_prohib_timer::ms128;
96 default:
97 report_fatal_error("Invalid sr-ProhibitTimer value={}", sr_prohibit_timer);
98 }
99}

◆ to_srb_id()

srb_id_t srsran::to_srb_id ( lcid_t lcid)
inline
72{
73 return is_srb(lcid) ? static_cast<srb_id_t>(lcid) : srb_id_t::nulltype;
74}

◆ to_string() [1/18]

const char * srsran::to_string ( bsr_format bsr)
inline
39{
40 static constexpr std::array<const char*, 4> names = {
41 "Short BSR", "Long BSR", "Short Truncated BSR", "Long Truncated BSR"};
42 return (size_t)bsr < names.size() ? names[(size_t)bsr] : "Invalid BSR format";
43}

◆ to_string() [2/18]

constexpr const char * srsran::to_string ( cpu_feature feature)
constexpr
64{
65 switch (feature) {
66#ifdef __x86_64__
67 case cpu_feature::avx:
68 return "avx";
69 case cpu_feature::avx2:
70 return "avx2";
71 case cpu_feature::avx512f:
72 return "avx512f";
73 case cpu_feature::avx512bw:
74 return "avx512bw";
75 case cpu_feature::avx512vl:
76 return "avx512vl";
77 case cpu_feature::avx512dq:
78 return "avx512dq";
79 case cpu_feature::avx512cd:
80 return "avx512cd";
81 case cpu_feature::pclmul:
82 return "pclmul";
83 case cpu_feature::sse4_1:
84 return "sse4.1";
85 case cpu_feature::fma:
86 return "fma";
87#endif // __x86_64__
88#ifdef __aarch64__
89 case cpu_feature::neon:
90 return "neon";
91#endif // __aarch64__
92 }
93 return "invalid_cpu_feature";
94}

◆ to_string() [3/18]

const char * srsran::to_string ( csi_report_quantities quantities)
inline
90{
91 switch (quantities) {
93 return "cri-ri-pmi-cqi";
95 return "cri-ri-cqi";
97 return "cri-ri-li-pmi-cqi";
99 default:
100 return "other";
101 }
102}
@ other
Other CSI report quantity configuration. Not supported.

◆ to_string() [4/18]

const char * srsran::to_string ( csi_rs_cdm_type value)
inline

Converts a CSI-RS CDM type to a string representation.

54{
55 switch (value) {
56 case csi_rs_cdm_type::no_CDM:
57 return "no_CDM";
58 case csi_rs_cdm_type::fd_CDM2:
59 return "fd_CDM2";
60 case csi_rs_cdm_type::cdm4_FD2_TD2:
61 return "cdm4_FD2_TD2";
62 case csi_rs_cdm_type::cdm8_FD2_TD4:
63 default:
64 return "cdm8_FD2_TD4";
65 }
66}

◆ to_string() [5/18]

const char * srsran::to_string ( csi_rs_freq_density_type value)
inline

Converts a CSI-RS density type to a string representation.

82{
83 switch (value) {
84 case csi_rs_freq_density_type::dot5_even_RB:
85 return "dot5_even";
86 case csi_rs_freq_density_type::dot5_odd_RB:
87 return "dot5_odd";
88 case csi_rs_freq_density_type::one:
89 return "one";
90 case csi_rs_freq_density_type::three:
91 default:
92 return "three";
93 }
94}

◆ to_string() [6/18]

const char * srsran::to_string ( duplex_mode mode)
inline
43{
44 constexpr static const char* names[] = {"FDD", "TDD", "SDL", "SUL", "invalid"};
45 return names[std::min((unsigned)mode, (unsigned)duplex_mode::INVALID)];
46}

◆ to_string() [7/18]

const char * srsran::to_string ( frequency_range freq_range)
inline
38{
39 constexpr static const char* names[] = {"FR1", "FR2", "invalid"};
40 return names[std::min(static_cast<unsigned>(freq_range), static_cast<unsigned>(frequency_range::FR2) + 1U)];
41}

◆ to_string() [8/18]

const char * srsran::to_string ( gtpu_extension_header_type type)
inline
91{
92 switch (type) {
93 case gtpu_extension_header_type::no_more_extension_headers:
94 return "no more extension headers";
95 case gtpu_extension_header_type::service_class_indicator:
96 return "service class indicator";
97 case gtpu_extension_header_type::udp_port:
98 return "UDP port";
99 case gtpu_extension_header_type::ran_container:
100 return "RAN container";
101 case gtpu_extension_header_type::long_pdcp_pdu_number_0:
102 case gtpu_extension_header_type::long_pdcp_pdu_number_1:
103 return "long PDCP PDU number";
104 case gtpu_extension_header_type::xw_ran_container:
105 return "XW RAN container";
106 case gtpu_extension_header_type::nr_ran_container:
107 return "NR RAN container";
108 case gtpu_extension_header_type::pdu_session_container:
109 return "PDU session container";
110 case gtpu_extension_header_type::pdcp_pdu_number:
111 return "PDCP PDU number";
112 case gtpu_extension_header_type::reserved_0:
113 case gtpu_extension_header_type::reserved_1:
114 case gtpu_extension_header_type::reserved_2:
115 case gtpu_extension_header_type::reserved_3:
116 return "reserved";
117 default:
118 return "invalid";
119 }
120};

◆ to_string() [9/18]

const char * srsran::to_string ( gtpu_information_element_type type)
inline
147{
148 switch (type) {
149 case gtpu_information_element_type::recovery:
150 return "Recovery";
151 case gtpu_information_element_type::tunnel_endpoint_identifier_data_i:
152 return "Tunnel Endpoint Identifier Data I";
153 case gtpu_information_element_type::gsn_address:
154 return "GSN Address";
155 case gtpu_information_element_type::extension_header_type_list:
156 return "Extension Header Type List";
157 case gtpu_information_element_type::private_extension:
158 return "Private Extension";
159 default:
160 return "Reserved";
161 }
162};

◆ to_string() [10/18]

std::string srsran::to_string ( modulation_scheme mod)
inline
55{
56 switch (mod) {
57 case modulation_scheme::PI_2_BPSK:
58 return "pi/2-BPSK";
59 case modulation_scheme::BPSK:
60 return "BPSK";
61 case modulation_scheme::QPSK:
62 return "QPSK";
63 case modulation_scheme::QAM16:
64 return "16QAM";
65 case modulation_scheme::QAM64:
66 return "64QAM";
67 case modulation_scheme::QAM256:
68 default:
69 return "256QAM";
70 }
71}

◆ to_string() [11/18]

const char * srsran::to_string ( pmi_codebook_type codebook)
inline
75{
76 switch (codebook) {
77 case pmi_codebook_type::one:
78 return "one-port";
79 case pmi_codebook_type::two:
80 return "two-port";
81 case pmi_codebook_type::typeI_single_panel_4ports_mode1:
82 return "TypeI-SinglePanel-FourPorts-Mode1";
83 case pmi_codebook_type::other:
84 default:
85 return "other";
86 }
87}

◆ to_string() [12/18]

constexpr const char * srsran::to_string ( prach_format_type format)
inlineconstexpr
50{
51 switch (format) {
52 case prach_format_type::zero:
53 return "0";
54 case prach_format_type::one:
55 return "1";
56 case prach_format_type::two:
57 return "2";
58 case prach_format_type::three:
59 return "3";
60 case prach_format_type::A1:
61 return "A1";
62 case prach_format_type::A1_B1:
63 return "A1/B1";
64 case prach_format_type::A2:
65 return "A2";
66 case prach_format_type::A2_B2:
67 return "A2/B2";
68 case prach_format_type::A3:
69 return "A3";
70 case prach_format_type::A3_B3:
71 return "A3/B3";
72 case prach_format_type::B1:
73 return "B1";
74 case prach_format_type::B4:
75 return "B4";
76 case prach_format_type::C0:
77 return "C0";
78 case prach_format_type::C2:
79 return "C2";
80 default:
81 srsran_assert(0, "Invalid PRACH format={}", format);
82 break;
83 }
84 return "";
85}

◆ to_string() [13/18]

const char * srsran::to_string ( prach_subcarrier_spacing ra_scs)
inline

Converts SCS to string.

53{
54 switch (ra_scs) {
55 case prach_subcarrier_spacing::kHz15:
56 return "15kHz";
57 case prach_subcarrier_spacing::kHz30:
58 return "30kHz";
59 case prach_subcarrier_spacing::kHz60:
60 return "60kHz";
61 case prach_subcarrier_spacing::kHz120:
62 return "120kHz";
63 case prach_subcarrier_spacing::kHz1_25:
64 return "1.25kHz";
65 case prach_subcarrier_spacing::kHz5:
66 return "5kHz";
67 case prach_subcarrier_spacing::invalid:
68 default:
69 return "invalid";
70 }
71}
Here is the caller graph for this function:

◆ to_string() [14/18]

const char * srsran::to_string ( restricted_set_config config)
inline
33{
34 switch (config) {
35 case restricted_set_config::TYPE_A:
36 return "type-A";
37 case restricted_set_config::TYPE_B:
38 return "type-B";
39 case restricted_set_config::UNRESTRICTED:
40 default:
41 return "unrestricted";
42 }
43}

◆ to_string() [15/18]

const char * srsran::to_string ( ssb_pattern_case pattern_case)
inline

Returns the subcarrier spacing corresponding to an SS/PBCH block pattern.

81{
82 switch (pattern_case) {
83 case ssb_pattern_case::A:
84 return "A";
85 case ssb_pattern_case::B:
86 return "B";
87 case ssb_pattern_case::C:
88 return "C";
89 case ssb_pattern_case::D:
90 return "D";
91 case ssb_pattern_case::E:
92 return "E";
93 case ssb_pattern_case::invalid:
94 default:
95 return "invalid";
96 }
97}

◆ to_string() [16/18]

const char * srsran::to_string ( subcarrier_spacing scs)
inline

Convert SCS to string.

87{
88 switch (scs) {
89 case subcarrier_spacing::kHz15:
90 return "15kHz";
91 case subcarrier_spacing::kHz30:
92 return "30kHz";
93 case subcarrier_spacing::kHz60:
94 return "60kHz";
95 case subcarrier_spacing::kHz120:
96 return "120kHz";
97 case subcarrier_spacing::kHz240:
98 return "240kHz";
99 case subcarrier_spacing::invalid:
100 default:
101 return "invalid";
102 }
103}

◆ to_string() [17/18]

constexpr const char * srsran::to_string ( uci_pucch_f0_or_f1_harq_values value)
inlineconstexpr
33{
34 switch (value) {
35 case uci_pucch_f0_or_f1_harq_values::nack:
36 return "nack";
37 case uci_pucch_f0_or_f1_harq_values::ack:
38 return "ack";
39 case uci_pucch_f0_or_f1_harq_values::dtx:
40 return "dtx";
41 default:
42 srsran_assert(0, "invalid UCI PUCCH Format 0/1 HARQ value={}", value);
43 break;
44 }
45 return "";
46}

◆ to_string() [18/18]

const char * srsran::to_string ( uci_status status)
inline

Gets a string representing a uci_status value.

45{
46 switch (status) {
47 case uci_status::valid:
48 return "valid";
49 case uci_status::unknown:
50 return "unknown";
51 case uci_status::invalid:
52 default:
53 return "invalid";
54 }
55}

◆ to_subcarrier_spacing() [1/3]

subcarrier_spacing srsran::to_subcarrier_spacing ( const std::string & str)
inline

Convert a string to SCS.

70{
71 unsigned in_scs = static_cast<unsigned>(std::strtof(str.data(), nullptr));
72 for (unsigned numerology = 0, numerology_end = to_numerology_value(subcarrier_spacing::invalid);
73 numerology != numerology_end;
74 ++numerology) {
76 unsigned scs_kHz = scs_to_khz(scs);
77
78 if ((in_scs == scs_kHz) || (in_scs == scs_kHz * 1000)) {
79 return scs;
80 }
81 }
82 return subcarrier_spacing::invalid;
83}

◆ to_subcarrier_spacing() [2/3]

subcarrier_spacing srsran::to_subcarrier_spacing ( ssb_pattern_case pattern_case)
inline

Returns the subcarrier spacing corresponding to an SS/PBCH block pattern.

62{
63 switch (pattern_case) {
64 case ssb_pattern_case::A:
65 return subcarrier_spacing::kHz15;
66 case ssb_pattern_case::B:
67 case ssb_pattern_case::C:
68 return subcarrier_spacing::kHz30;
69 case ssb_pattern_case::D:
70 return subcarrier_spacing::kHz120;
71 case ssb_pattern_case::E:
72 return subcarrier_spacing::kHz240;
73 case ssb_pattern_case::invalid:
74 default:
75 return subcarrier_spacing::invalid;
76 }
77}

◆ to_subcarrier_spacing() [3/3]

constexpr subcarrier_spacing srsran::to_subcarrier_spacing ( unsigned numerology)
inlineconstexpr

Convert numerology index ( $\mu$) to SCS.

64{
65 return static_cast<subcarrier_spacing>(numerology);
66}

◆ to_symbol_index()

unsigned srsran::to_symbol_index ( dmrs_typeA_position pos)
inline
32{
33 return static_cast<unsigned>(pos);
34}

◆ to_ue_cell_index()

ue_cell_index_t srsran::to_ue_cell_index ( std::underlying_type_t< ue_cell_index_t > idx)
inline
73{
74 return static_cast<ue_cell_index_t>(idx);
75}
ue_cell_index_t
Maximum number of cells supported by a single UE.
Definition du_types.h:65

◆ to_unsigned()

unsigned srsran::to_unsigned ( gnb_sched_affinity_mask_types value)
inline

Converts and returns the given affinity mask type to an integer.

56{
57 return static_cast<unsigned>(value);
58}

◆ to_value()

constexpr uint16_t srsran::to_value ( rnti_t rnti)
inlineconstexpr

Converts RNTI value to integer.

58{
59 return static_cast<uint16_t>(rnti);
60}
Here is the caller graph for this function:

◆ type0_pdcch_css_n0_is_even_frame()

unsigned srsran::type0_pdcch_css_n0_is_even_frame ( double table_13_11_and_13_12_O,
double table_13_11_and_13_12_M,
uint8_t numerology_mu,
unsigned ssb_index )

Helper function that returns whether slot n0 of Type0-PDCCH CSS is in an even/odd frame.

Parameters
[in]table_13_11_and_13_12_OParameter O provided in Table 13-11 and 13-12 of TS 38 213.
[in]table_13_11_and_13_12_MParameter M provided in Table 13-11 and 13-12 of TS 38 213.
[in]numerology_muNumerlogy based on SCS for PDCCH receptions in the CORESET.
[in]ssb_indexSS/PBCH block with index.
Returns
0 if slot n0 is located in an even frame or 1 if slot n0 is located in an odd frame.
95{
96 // This is only used to retrieve the nof_slots_per_frame.
98
99 // Compute floor( ( O * 2^mu + floor(i*M) ) / nof_slots_per_frame ) mod 2, as per TS 38.213, Section 13.
100 unsigned is_even = static_cast<unsigned>(floor(static_cast<double>(table_13_11_and_13_12_O * (1U << numerology_mu)) +
101 floor(static_cast<double>(ssb_index) * table_13_11_and_13_12_M)) /
102 sl_point.nof_slots_per_frame()) %
103 2;
104 return is_even;
105}

◆ uci_part2_get_size()

unsigned srsran::uci_part2_get_size ( const uci_payload_type & part1,
const uci_part2_size_description & descr )

Calculates the UCI part 2 from UCI part 1.

Parameters
[in]part1UCI part 1 decoded data.
[in]descrUCI part 1 parameters correspondence to UCI part 2 size.
Returns
The size of UCI part 2 payload.
55{
56 unsigned result = 0;
57
58 // Iterate all entries.
59 for (const uci_part2_size_description::entry& entry : descr.entries) {
60 unsigned index = 0;
61 unsigned index_bitwidth = 0;
62
63 for (const uci_part2_size_description::parameter& parameter : entry.parameters) {
64 // Extract the value of the parameter.
65 unsigned value = extract_parameter(parameter.offset, parameter.width, part1);
66
67 // Combine the parameter value with the current index.
68 index = (index << parameter.width) | value;
69
70 // Accumulate the index bit width.
71 index_bitwidth += parameter.width;
72 }
73
74 // Verify the map size is according to the index bit width.
75 srsran_assert(entry.map.size() == (1U << index_bitwidth),
76 "Invalid map size (i.e., {}), expected {} entries.",
77 entry.map.size(),
78 (1U << index_bitwidth));
79
80 // Verify that the index is within the map size.
81 srsran_assert(
82 index < entry.map.size(), "Index value (i.e., {}) exceeds the map size (i.e., {}).", index, entry.map.size());
83
84 // Add the Part 2 size corresponding to this entry.
85 result += entry.map[index];
86 }
87
88 return result;
89}

◆ uint_to_dmrs_additional_positions()

dmrs_additional_positions srsran::uint_to_dmrs_additional_positions ( uint8_t dmrs_add_pos)
inline
45{
46 return static_cast<dmrs_additional_positions>(dmrs_add_pos);
47}
dmrs_additional_positions
Position for additional DM-RS in DL (see TS 38.211, Tables 7.4.1.1.2-3 and 7.4.1.1....
Definition dmrs.h:42

◆ uint_to_drb_id()

constexpr drb_id_t srsran::uint_to_drb_id ( uint8_t id)
inlineconstexpr
134{
135 return static_cast<drb_id_t>(id);
136}

◆ uint_to_five_qi()

constexpr five_qi_t srsran::uint_to_five_qi ( uint16_t five_qi)
inlineconstexpr

Convert integer to Five QI type.

44{
45 srsran_assert(
46 five_qi < MAX_FIVEQI, "Invalid 5QI {} - Must be between [{}..{}]", five_qi, five_qi_t::min, five_qi_t::max);
47 return static_cast<five_qi_t>(five_qi);
48}
five_qi_t
Five QI.
Definition five_qi.h:34

◆ uint_to_lcg_id()

lcg_id_t srsran::uint_to_lcg_id ( std::underlying_type_t< lcg_id_t > val)
inline
34{
35 return static_cast<lcg_id_t>(val);
36}
lcg_id_t
Logical Channel Group as per TS38.331.
Definition logical_channel_group.h:31

◆ uint_to_lcid()

constexpr lcid_t srsran::uint_to_lcid ( std::underlying_type_t< lcid_t > val)
inlineconstexpr
44{
45 return static_cast<lcid_t>(val);
46}

◆ uint_to_nr_band()

constexpr nr_band srsran::uint_to_nr_band ( unsigned band)
inlineconstexpr
63{
64 return static_cast<nr_band>(band);
65}

◆ uint_to_pdu_session_id()

constexpr pdu_session_id_t srsran::uint_to_pdu_session_id ( uint16_t idx)
inlineconstexpr

Convert integer to PDU Session ID type.

50{
51 return static_cast<pdu_session_id_t>(idx);
52}
pdu_session_id_t
PDU Session ID.
Definition cu_types.h:40

◆ uint_to_psup_pdu_type()

constexpr psup_pdu_type srsran::uint_to_psup_pdu_type ( uint8_t num)
inlineconstexpr

Convert integer to PSUP PDU Type.

44{
45 return static_cast<psup_pdu_type>(num);
46}
psup_pdu_type
Definition psup_message.h:34

◆ uint_to_psup_ppi()

constexpr psup_ppi srsran::uint_to_psup_ppi ( uint8_t num)
inlineconstexpr

Convert integer to PSUP Paging Policy Indicator.

64{
65 return static_cast<psup_ppi>(num);
66}
psup_ppi
Definition psup_message.h:54

◆ uint_to_qos_flow_id()

constexpr qos_flow_id_t srsran::uint_to_qos_flow_id ( uint8_t idx)
inlineconstexpr

Convert integer to QoS Flow ID type.

69{
70 return static_cast<qos_flow_id_t>(idx);
71}
qos_flow_id_t
QoS Flow ID.
Definition cu_types.h:59

◆ uint_to_qos_prio_level()

constexpr qos_prio_level_t srsran::uint_to_qos_prio_level ( uint8_t qos_prio_level)
inlineconstexpr

Convert integer to QoS Priority Level type.

44{
45 srsran_assert(qos_prio_level < MAX_QOS_PRIO_LEVEL,
46 "Invalid QoS Priority Level {} - Must be between [{}..{}]",
47 qos_prio_level,
48 qos_prio_level_t::min,
49 qos_prio_level_t::max);
50 return static_cast<qos_prio_level_t>(qos_prio_level);
51}
qos_prio_level_t
QoS Priority Level.
Definition qos_prio_level.h:34

◆ uint_to_ran_ue_id()

ran_ue_id_t srsran::uint_to_ran_ue_id ( std::underlying_type_t< ran_ue_id_t > id)
inline

Convert integer to RAN_UE_ID type.

86{
87 return static_cast<ran_ue_id_t>(id);
88}

◆ uint_to_sched_req_id()

scheduling_request_id srsran::uint_to_sched_req_id ( unsigned sr_id)
inline

Convert unsigned to scheduling_request_id.

40{
41 return static_cast<scheduling_request_id>(sr_id);
42}
scheduling_request_id
SchedulingRequestResourceId, as per TS 38.331.
Definition sr_configuration.h:36

◆ uint_to_serv_cell_index()

serv_cell_index_t srsran::uint_to_serv_cell_index ( unsigned idx)
inline

Converts a uint into a serv_cell_index.

53{
54 return idx < MAX_NOF_SERVING_CELLS ? static_cast<serv_cell_index_t>(idx)
55 : static_cast<serv_cell_index_t>(MAX_NOF_SERVING_CELLS);
56}

◆ uint_to_tag_id()

tag_id_t srsran::uint_to_tag_id ( unsigned tag_id)
inline

Converts a uint into a enum tag_id_t .

35{
36 return static_cast<tag_id_t>(tag_id);
37}
tag_id_t
TAG-Id, TS 38.331.
Definition time_alignment_group_config.h:31

◆ up_transport_layer_info_to_asn1()

template<typename Asn1Type >
void srsran::up_transport_layer_info_to_asn1 ( Asn1Type & asn1obj,
const up_transport_layer_info & up_tp_layer_info )

Converts type up_transport_layer_info to an ASN.1 type.

Parameters
asn1objASN.1 object where the result of the conversion is stored.
up_tp_layer_infoUP Transport Layer Info object.
51{
52 asn1obj.set_gtp_tunnel();
53 asn1obj.gtp_tunnel().gtp_teid.from_number(up_tp_layer_info.gtp_teid.value());
54 asn1obj.gtp_tunnel().transport_layer_address.from_string(up_tp_layer_info.tp_address.to_bitstring());
55}
std::string to_bitstring() const
Converts the transport layer address to a string of bits (each character is base 2).
Definition transport_layer_address.cpp:77

◆ validate_appconfig()

bool srsran::validate_appconfig ( const gnb_appconfig & config)

Validates the given GNB application configuration. Returns true on success, false otherwise.

1244{
1245 if (!validate_log_appconfig(config.log_cfg)) {
1246 return false;
1247 }
1248
1249 if (!validate_amf_appconfig(config.amf_cfg)) {
1250 return false;
1251 }
1252
1253 if (!validate_cu_cp_appconfig(config.cu_cp_cfg, config.cells_cfg.front().cell.sib_cfg)) {
1254 return false;
1255 }
1256
1257 if (!validate_cells_appconfig(config.cells_cfg)) {
1258 return false;
1259 }
1260
1261 if (!config.log_cfg.phy_rx_symbols_filename.empty() && config.log_cfg.phy_rx_symbols_port.has_value() &&
1262 (config.log_cfg.phy_rx_symbols_port.value() >= config.cells_cfg.front().cell.nof_antennas_ul)) {
1263 fmt::print("Requested IQ dump from Rx port {}, valid Rx ports are 0-{}.\n",
1264 config.log_cfg.phy_rx_symbols_port.value(),
1265 config.cells_cfg.front().cell.nof_antennas_ul - 1);
1266 return false;
1267 }
1268
1269 if (!validate_pdcch_appconfig(config)) {
1270 return false;
1271 }
1272
1273 if (!validate_qos_appconfig(config.qos_cfg)) {
1274 return false;
1275 }
1276
1277 if (!validate_srb_appconfig(config.srb_cfg)) {
1278 return false;
1279 }
1280
1281 if (!validate_security_appconfig(config.cu_cp_cfg.security_config)) {
1282 return false;
1283 }
1284
1285 if (!validate_expert_phy_appconfig(config.expert_phy_cfg)) {
1286 return false;
1287 }
1288
1289 if (config.ntn_cfg.has_value()) {
1290 if (!validate_ntn_config(config.ntn_cfg.value())) {
1291 return false;
1292 }
1293 }
1294
1297
1298 if (!validate_ru_sdr_appconfig(sdr_cfg, config.cells_cfg.front())) {
1299 return false;
1300 }
1301
1302 if (sdr_cfg.srate_MHz < bs_channel_bandwidth_to_MHz(config.cells_cfg.front().cell.channel_bw_mhz)) {
1303 fmt::print("Sampling rate (i.e. {} MHz) is too low for the requested channel bandwidth (i.e. {} MHz).\n",
1304 sdr_cfg.srate_MHz,
1305 bs_channel_bandwidth_to_MHz(config.cells_cfg.front().cell.channel_bw_mhz));
1306 return false;
1307 }
1308 }
1309
1312
1313 if (config.cells_cfg.size() != ofh_cfg.cells.size()) {
1314 fmt::print("Number of cells in the DU={} don't match the number of cells in the RU={}\n",
1315 config.cells_cfg.size(),
1316 ofh_cfg.cells.size());
1317
1318 return false;
1319 }
1320
1321 if (!validate_ru_ofh_appconfig(config)) {
1322 return false;
1323 }
1324 }
1325
1326 if (!validate_test_mode_appconfig(config)) {
1327 return false;
1328 }
1329
1330 if (!validate_hal_config(config.hal_config)) {
1331 return false;
1332 }
1333
1334 if (!validate_expert_execution_appconfig(config)) {
1335 return false;
1336 }
1337
1338 if (!validate_pcap_configs(config)) {
1339 return false;
1340 }
1341
1342 return true;
1343}
constexpr unsigned bs_channel_bandwidth_to_MHz(bs_channel_bandwidth_fr1 bw)
Converts the BS channel bandwidth label into the actual BW value in MHz.
Definition bs_channel_bandwidth.h:50
optional< hal_appconfig > hal_config
HAL configuration.
Definition gnb_appconfig.h:1268

◆ validate_dci_size_config()

bool srsran::validate_dci_size_config ( const dci_size_config & config)

Validates a DCI configuration for the DCI size alignment procedure.

1559{
1560 // Check that UL and DL BWP and CORESET 0 bandwidths are within range.
1561 if ((config.dl_bwp_initial_bw > MAX_RB) || (config.ul_bwp_initial_bw > MAX_RB) || (config.coreset0_bw > MAX_RB)) {
1562 return false;
1563 }
1564
1565 // Fallback DCI formats monitored on a CSS need the initial UL and DL BWP bandwidth.
1566 if ((config.dl_bwp_initial_bw == 0) || (config.ul_bwp_initial_bw == 0)) {
1567 return false;
1568 }
1569
1570 // Supplementary Uplink is not currently supported by the DCI size alignment procedure.
1571 if (config.sul_configured) {
1572 return false;
1573 }
1574
1575 // Checks pertaining to any DCI format on a USS.
1576 if (config.dci_0_0_and_1_0_ue_ss || config.dci_0_1_and_1_1_ue_ss) {
1577 // DCI formats monitored on a USS need the active UL and DL BWP bandwidth.
1578 if ((config.dl_bwp_active_bw == 0) || (config.dl_bwp_active_bw > MAX_RB) || (config.ul_bwp_active_bw == 0) ||
1579 (config.ul_bwp_active_bw > MAX_RB)) {
1580 return false;
1581 }
1582 }
1583
1584 // Checks pertaining to non-fallback DCI formats.
1585 if (config.dci_0_1_and_1_1_ue_ss) {
1586 // Number of BWP configured by higher layers cannot exceed 4.
1587 if ((config.nof_ul_bwp_rrc > 4) || config.nof_dl_bwp_rrc > 4) {
1588 return false;
1589 }
1590
1591 // Number of UL time domain resource allocations must be within the valid range {1, ..., 16}
1592 if ((config.nof_ul_time_domain_res == 0) || (config.nof_ul_time_domain_res > 16)) {
1593 return false;
1594 }
1595
1596 // Number of DL time domain resource allocations must be within the valid range {1, ..., 16}
1597 if ((config.nof_dl_time_domain_res == 0) || (config.nof_dl_time_domain_res > 16)) {
1598 return false;
1599 }
1600
1601 // Size of the DCI request field, determined by the higher layer parameter reportTriggerSize, cannot exceed 6.
1602 if (config.report_trigger_size > 6) {
1603 return false;
1604 }
1605
1606 // Number of aperiodic ZP CSI-RS resource sets cannot exceed 3.
1607 if (config.nof_aperiodic_zp_csi > 3) {
1608 return false;
1609 }
1610
1611 // Number of PDSCH to DL ACK timings exceeds the valid range {1, ..., 8}.
1612 if ((config.nof_pdsch_ack_timings == 0) || (config.nof_pdsch_ack_timings > 8)) {
1613 return false;
1614 }
1615
1616 // Requirements if transform precoding is enabled.
1617 if (config.transform_precoding_enabled) {
1618 // With transform precoding enabled for the UL, the PUSCH DM-RS configuration can only be type 1.
1619 if (config.pusch_dmrs_A_type.has_value() && (config.pusch_dmrs_A_type == dmrs_config_type::type2)) {
1620 return false;
1621 }
1622 if (config.pusch_dmrs_B_type.has_value() && (config.pusch_dmrs_B_type == dmrs_config_type::type2)) {
1623 return false;
1624 }
1625 }
1626
1627 // Requirement if the PDSCH HARQ-ACK codebook type is set to dynamic.
1628 if (config.pdsch_harq_ack_cb == pdsch_harq_ack_codebook::dynamic) {
1629 // The dynamic dual HARQ-ACK codebook flag is required.
1630 if (!config.dynamic_dual_harq_ack_cb.has_value()) {
1631 return false;
1632 }
1633 }
1634
1635 // Requirements for UL resource allocation type 0.
1636 if (config.pusch_res_allocation_type != resource_allocation::resource_allocation_type_1) {
1637 // Number of UL RBGs is required, and must not exceed the valid range.
1638 if (!config.nof_ul_rb_groups.has_value() || (config.nof_ul_rb_groups.value() > MAX_NOF_RBGS) ||
1639 (config.nof_ul_rb_groups.value() == 0)) {
1640 return false;
1641 }
1642 }
1643
1644 // Requirements for DL resource allocation type 0.
1645 if (config.pdsch_res_allocation_type != resource_allocation::resource_allocation_type_1) {
1646 // Number of DL RBGs is required, and must not exceed the valid range.
1647 if (!config.nof_dl_rb_groups.has_value() || (config.nof_dl_rb_groups.value() > MAX_NOF_RBGS) ||
1648 (config.nof_dl_rb_groups.value() == 0)) {
1649 return false;
1650 }
1651 }
1652
1653 // Requirements for DL resource allocation type 1.
1654 if (config.pdsch_res_allocation_type != resource_allocation::resource_allocation_type_0) {
1655 // Interleaved VRB to PRB mapping flag is required.
1656 if (!config.interleaved_vrb_prb_mapping.has_value()) {
1657 return false;
1658 }
1659 }
1660
1661 // Requirements for non-codebook based transmission.
1662 if (config.tx_config_non_codebook) {
1663 // PUSCH max number of layers is required, and it must be set to one.
1664 if (!config.pusch_max_layers.has_value() || (config.pusch_max_layers.value() != 1)) {
1665 return false;
1666 }
1667
1668 // For non-codebook based transmission, the number of SRS resources must be within the valid range {1, ..., 4}.
1669 if ((config.nof_srs_resources == 0) || (config.nof_srs_resources > 4)) {
1670 return false;
1671 }
1672
1673 // Requirements for codebook based transmission.
1674 } else {
1675 // Maximum rank is required for codebook-based transmission, and it must be within the valid range {1, ..., 4}.
1676 if (!config.max_rank.has_value() || (config.max_rank.value() == 0) || (config.max_rank.value() > 4)) {
1677 return false;
1678 }
1679
1680 // For codebook based transmission, the number of SRS ports is required.
1681 if (!config.nof_srs_ports.has_value()) {
1682 return false;
1683 }
1684
1685 // For codebook based transmission, the number of SRS resources must be within the valid range {1, 2}.
1686 if ((config.nof_srs_resources == 0) || (config.nof_srs_resources > 2)) {
1687 return false;
1688 }
1689
1690 // Maximum rank cannot be greater than the number of SRS ports.
1691 if (config.max_rank.value() > config.nof_srs_ports.value()) {
1692 return false;
1693 }
1694
1695 // The number of SRS ports must be a valid value {1, 2, 4}.
1696 switch (config.nof_srs_ports.value()) {
1697 case 1:
1698 break;
1699 case 2:
1700 case 4:
1701 // Codebook subset is required for codebook based transmission with more than one antenna port.
1702 if (!config.cb_subset.has_value()) {
1703 return false;
1704 }
1705 // Currently, UL precoding with multiple antenna ports is not supported.
1706 return false;
1707 default:
1708 return false;
1709 }
1710 }
1711
1712 // PT-RS to DM-RS association is not currently supported.
1714 (config.tx_config_non_codebook || (config.max_rank.value() > 1))) {
1715 return false;
1716 }
1717
1718 // At least one PUSCH DM-RS mapping must be configured.
1719 if ((!config.pusch_dmrs_A_type.has_value() || !config.pusch_dmrs_A_max_len.has_value()) &&
1720 (!config.pusch_dmrs_B_type.has_value() || !config.pusch_dmrs_B_max_len.has_value())) {
1721 return false;
1722 }
1723
1724 // At least one PDSCH DM-RS mapping must be configured.
1725 if ((!config.pdsch_dmrs_A_type.has_value() || !config.pdsch_dmrs_A_max_len.has_value()) &&
1726 (!config.pdsch_dmrs_B_type.has_value() || !config.pdsch_dmrs_B_max_len.has_value())) {
1727 return false;
1728 }
1729
1730 if (config.max_cbg_tb_pusch.has_value()) {
1731 // The Maximum PUSCH CBG per TB must be set to a valid value.
1732 if (!max_cbg_tb_is_valid(config.max_cbg_tb_pusch.value())) {
1733 return false;
1734 }
1735 }
1736
1737 if (config.max_cbg_tb_pdsch.has_value()) {
1738 // The Maximum PDSCH CBG per TB must be set to a valid value.
1739 if (!max_cbg_tb_is_valid(config.max_cbg_tb_pdsch.value())) {
1740 return false;
1741 }
1742 }
1743 }
1744
1745 return true;
1746}
const size_t MAX_NOF_RBGS
Definition resource_block_group.h:32
optional< unsigned > nof_ul_rb_groups
parameter , in TS38.214 Section 6.1.2.2.1.
Definition dci_packing.h:186
unsigned nof_ul_time_domain_res
parameter in TS38.212 Section 7.3.1.1.2.
Definition dci_packing.h:140
optional< unsigned > nof_srs_ports
Number of antenna ports used for PUSCH codebook-based transmission.
Definition dci_packing.h:192
optional< unsigned > nof_dl_rb_groups
parameter , in TS38.214 Section 5.1.2.2.1.
Definition dci_packing.h:334
bool ptrs_uplink_configured
PT-RS signals flag.
Definition dci_packing.h:164
optional< dmrs_config_type > pusch_dmrs_A_type
UL DM-RS type for DM-RS mapping type A.
Definition dci_packing.h:229
unsigned dl_bwp_initial_bw
Bandwidth of the initial DL BWP in number of Resource Blocks.
Definition dci_packing.h:90
optional< bool > dynamic_dual_harq_ack_cb
Dual dynamic HARQ-ACK codebook flag.
Definition dci_packing.h:174
unsigned nof_dl_time_domain_res
parameter in TS38.212 Section 7.3.1.2.2.
Definition dci_packing.h:272
resource_allocation pusch_res_allocation_type
PUSCH resource allocation type for DCI format 0_1, as per TS38.214 Section 6.1.2.2.
Definition dci_packing.h:179
unsigned nof_ul_bwp_rrc
parameter for DCI format 0_1, in TS38.212 Section 7.3.1.1.2.
Definition dci_packing.h:130
optional< unsigned > max_cbg_tb_pusch
Maximum number of PUSCH Code Block Groups (CBG) per Transport Block (TB).
Definition dci_packing.h:253
optional< dmrs_max_length > pdsch_dmrs_A_max_len
Maximum number of OFDM symbols occupied by the front-loaded DL DM-RS for DM-RS mapping type A.
Definition dci_packing.h:352
optional< dmrs_config_type > pdsch_dmrs_B_type
DM-RS type for PDSCH DM-RS mapping type B.
Definition dci_packing.h:358
bool tx_config_non_codebook
Non-codebook based transmission flag.
Definition dci_packing.h:155
optional< dmrs_max_length > pusch_dmrs_A_max_len
Maximum number of OFDM symbols occupied by the front-loaded UL DM-RS for DM-RS mapping type A.
Definition dci_packing.h:235
optional< dmrs_config_type > pdsch_dmrs_A_type
DM-RS type for PDSCH DM-RS mapping type A.
Definition dci_packing.h:346
unsigned nof_pdsch_ack_timings
Number of PDSCH to the DL ACK timings.
Definition dci_packing.h:285
unsigned report_trigger_size
Size of the CSI request DCI field. See TS38.214 Section 5.2.1.5.1.
Definition dci_packing.h:145
bool transform_precoding_enabled
UL transform precoding flag.
Definition dci_packing.h:159
resource_allocation pdsch_res_allocation_type
PDSCH resource allocation type for DCI format 1_1, as per TS38.214 Section 5.1.2.2.
Definition dci_packing.h:325
unsigned nof_srs_resources
Parameter in TS38.212 Section 7.3.1.1.2, indicating the number of SRS resources.
Definition dci_packing.h:198
unsigned nof_dl_bwp_rrc
parameter for DCI format 1_1, in TS38.212 Section 7.3.1.2.2.
Definition dci_packing.h:262
optional< tx_scheme_codebook_subset > cb_subset
Subset of PMIs addressed by TPMI.
Definition dci_packing.h:223
optional< dmrs_max_length > pusch_dmrs_B_max_len
Maximum number of OFDM symbols occupied by the front-loaded UL DM-RS for DM-RS mapping type B.
Definition dci_packing.h:247
pdsch_harq_ack_codebook pdsch_harq_ack_cb
PDSCH HARQ-ACK codebook type.
Definition dci_packing.h:121
optional< dmrs_max_length > pdsch_dmrs_B_max_len
Maximum number of OFDM symbols occupied by the front-loaded DL DM-RS for DM-RS mapping type B.
Definition dci_packing.h:364
unsigned nof_aperiodic_zp_csi
Number of configured aperiodic ZP CSI-RS resource sets.
Definition dci_packing.h:279
optional< unsigned > max_rank
Maximum UE transmission rank for codebook based operation.
Definition dci_packing.h:216
optional< dmrs_config_type > pusch_dmrs_B_type
UL DM-RS type for DM-RS mapping type B.
Definition dci_packing.h:241
optional< unsigned > pusch_max_layers
Parameter in TS38.212 Section 7.3.1.1.2.
Definition dci_packing.h:208
optional< unsigned > max_cbg_tb_pdsch
Maximum number of PDSCH Code Block Groups (CBG) per Transport Block (TB).
Definition dci_packing.h:371
bool sul_configured
Supplementary uplink flag.
Definition dci_packing.h:106

◆ validate_prach_detector_phy()

bool srsran::validate_prach_detector_phy ( prach_format_type format,
prach_subcarrier_spacing scs,
unsigned zero_correlation_zone,
unsigned nof_rx_ports )

Ensures the PRACH configuration is supported by the detector.

Parameters
[in]formatPRACH format.
[in]scsPRACH subcarrier spacing.
[in]zero_correlation_zonePRACH zero correlation zone.
[in]nof_rx_portsNumber of receive antenna ports.
Returns
True if the PRACH configuration is support by the detector, false otherwise.
41{
43 th_params.nof_rx_ports = nof_rx_ports;
44 th_params.scs = scs;
45 th_params.format = format;
46 th_params.zero_correlation_zone = zero_correlation_zone;
47 th_params.combine_symbols = true;
48
49 const detail::threshold_and_margin_finder threshold_and_margin_table(detail::all_threshold_and_margins);
50 auto flag = threshold_and_margin_table.check_flag(th_params);
51
52 if (flag == detail::threshold_and_margin_finder::threshold_flag::red) {
53 fmt::print("\nThe PRACH detector does not support the configuration {{Format {}, ZCZ {}, SCS {}, Rx ports {}}}.\n",
54 to_string(format),
55 zero_correlation_zone,
56 to_string(scs),
57 nof_rx_ports);
58 return false;
59 }
60
61 if (flag == detail::threshold_and_margin_finder::threshold_flag::orange) {
62 // Contains the PRACH threshold parameters that have already reported orange.
63 static std::set<detail::threshold_params> prach_detector_phy_validator_orange_set;
64
65 // Print message only once.
67 fmt::print("\nThe PRACH detector will not meet the performance requirements with the configuration {{Format {}, "
68 "ZCZ {}, SCS {}, Rx ports {}}}.\n",
69 to_string(format),
70 zero_correlation_zone,
71 to_string(scs),
72 nof_rx_ports);
74 }
75 }
76 return true;
77}
Manages the mapping between PRACH configuration and the (threshold, margin) pairs.
Definition prach_detector_generic_thresholds.h:122
Parameters that affect the detection threshold value.
Definition prach_detector_generic_thresholds.h:37
unsigned nof_rx_ports
Number of receive antenna ports.
Definition prach_detector_generic_thresholds.h:39
Here is the call graph for this function:

◆ validate_pucch_csi_payload()

bool srsran::validate_pucch_csi_payload ( const csi_report_packed & packed,
const csi_report_configuration & config )

Checks that the CSI payload carried over PUCCH is valid given a CSI report configuration.

This validator can be used before calling csi_report_unpack_pucch to avoid triggering any assertions.

Parameters
[in]packedPacked CSI report.
[in]configCSI report configuration.
Returns
true if the CSI payload is valid, false otherwise.
202{
203 // CSI report configuration is invalid.
204 if (!is_valid(config)) {
205 return false;
206 }
207
208 // The number of packed bits does not match the expected CSI report size.
209 if (packed.size() != get_csi_report_pucch_size(config).value()) {
210 return false;
211 }
212
215 unsigned ri_packed = packed.extract(sizes.cri, sizes.ri);
216
217 // The RI is out of bounds given the number of allowed rank values.
218 if (ri_packed >= config.ri_restriction.count()) {
219 return false;
220 }
221
222 return true;
223}

◆ validate_pusch_csi_payload()

bool srsran::validate_pusch_csi_payload ( const csi_report_packed & csi1_packed,
const csi_report_packed & csi2_packed,
const csi_report_configuration & config )

Checks that the CSI payload carried over PUSCH is valid given a CSI report configuration.

This validator can be used before calling csi_report_unpack_pusch to avoid triggering any assertions.

Parameters
[in]csi1_packedPacked CSI Part 1 report.
[in]csi2_packedPacked CSI Part 2 report.
[in]configCSI report configuration.
Returns
true if the CSI payload is valid, false otherwise.
239{
240 // CSI report configuration is invalid.
241 if (!is_valid(config)) {
242 return false;
243 }
244
245 // If the PMI codebook type is for more than a single CSI-RS port and the CSI report quantities include PMI and/or LI,
246 // The CSI Part 2 payload must be present.
247 if (((config.pmi_codebook != pmi_codebook_type::one) &&
248 ((config.quantities == csi_report_quantities::cri_ri_li_pmi_cqi) ||
249 (config.quantities == csi_report_quantities::cri_ri_pmi_cqi))) &&
250 csi2_packed.empty()) {
251 return false;
252 }
253
254 // Verify the CSI Part 1 payload size.
257 units::bits csi_part1_size = get_csi_report_part1_size(config, sizes);
258 if (csi1_packed.size() != csi_part1_size.value()) {
259 return false;
260 }
261
262 unsigned ri_packed = csi1_packed.extract(sizes.cri, sizes.ri);
263
264 // The RI is out of bounds given the number of allowed rank values.
265 if (ri_packed >= config.ri_restriction.count()) {
266 return false;
267 }
268
269 // Verify the CSI Part 2 payload size.
271 csi_report_unpack_ri(csi1_packed.slice(sizes.cri, sizes.cri + sizes.ri), config.ri_restriction);
272 units::bits csi_part2_size = get_csi_report_part2_size(config, ri);
273 if (csi2_packed.size() != csi_part2_size.value()) {
274 return false;
275 }
276
277 return true;
278}
csi_report_data::ri_type csi_report_unpack_ri(const csi_report_packed &ri_packed, const ri_restriction_type &ri_restriction)
Unpacks RI as per TS38.212 Section 6.3.1.1.2. and TS38.214 Section 5.2.2.2.1.
Definition csi_report_on_puxch_helpers.cpp:273

◆ variant_get() [1/3]

template<typename T , typename... Types>
constexpr const T & srsran::variant_get ( const variant< Types... > & v)
inlineconstexpr

Reads the value of the variant given the index or the type (if the type is unique).

Parameters
[in]vVariant to examine.
Returns
Reference to the value stored in the variant.
37{
38 return mpark::get<T, Types...>(v);
39}

◆ variant_get() [2/3]

template<size_t Idx, typename... Types>
constexpr const auto & srsran::variant_get ( const variant< Types... > & v)
inlineconstexpr

Reads the value of the variant given the index.

Parameters
[in]vVariant to examine.
Returns
Reference to the value stored in the variant.
64{
65 return mpark::get<Idx, Types...>(v);
66}

◆ variant_get() [3/3]

template<typename T , typename... Types>
constexpr T & srsran::variant_get ( variant< Types... > & v)
inlineconstexpr

Reads the value of the variant given the index or the type (if the type is unique).

Parameters
[in]vVariant to examine.
Returns
Non-const Reference to the value stored in the variant.
46{
47 return mpark::get<T, Types...>(v);
48}

◆ variant_holds_alternative()

template<typename T , typename... Types>
constexpr bool srsran::variant_holds_alternative ( const variant< Types... > & v)
inlineconstexprnoexcept

Checks if the variant v holds the alternative T.

Parameters
[in]vVariant to examine.
Returns
True if the variant currently holds the alternative T, false otherwise.
55{
56 return mpark::holds_alternative<T, Types...>(v);
57}

◆ variant_visit()

template<typename Visitor , typename... Vs>
constexpr auto srsran::variant_visit ( Visitor && visitor,
Vs &&... vs )
inlineconstexpr

Apply a visitor to the variant.

71{
72 return mpark::visit(std::forward<Visitor>(visitor), std::forward<Vs>(vs)...);
73}

◆ visit_executor() [1/2]

template<typename Func , concurrent_queue_policy... QueuePolicies>
void srsran::visit_executor ( priority_task_worker< QueuePolicies... > & worker,
task_priority priority,
const Func & func )

Create general task executor pointer with Priority for priority_multiqueue_task_worker.

197{
198 detail::visit_executor(worker, priority, func, std::make_index_sequence<sizeof...(QueuePolicies)>{});
199}

◆ visit_executor() [2/2]

template<typename Func , concurrent_queue_policy... QueuePolicies>
void srsran::visit_executor ( task_worker_pool< QueuePolicies... > & worker,
enqueue_priority priority,
const Func & func )

Create general task executor pointer with Priority for priority_task_worker_pool.

305{
306 detail::visit_executor(worker, priority, func, std::make_index_sequence<sizeof...(QueuePolicies)>{});
307}

◆ when_completed_on_task_sched() [1/2]

template<typename Callback , typename ReturnType = detail::function_return_t<decltype(&std::decay_t<Callback>::operator())>, std::enable_if_t< std::is_same< ReturnType, void >::value, int > = 0>
async_task< bool > srsran::when_completed_on_task_sched ( fifo_async_task_scheduler & task_sched,
Callback && task_to_run )

Launches an asynchronous task on the given task sequencer and returns an async task that is only complete when the former is complete.

This function is useful to synchronize two procedures running in separate task schedulers.

Template Parameters
Callback
ReturnType
Parameters
task_sched
task_to_run
Returns
117{
118 struct task_offloader {
119 task_offloader(fifo_async_task_scheduler& task_sched_, Callback&& callback_) :
120 task_sched(task_sched_), callback(std::forward<Callback>(callback_))
121 {
122 }
123
124 void operator()(coro_context<async_task<bool>>& ctx)
125 {
126 CORO_BEGIN(ctx);
127
128 task_sched.schedule(dispatched_task());
129
130 CORO_AWAIT_VALUE(const bool result, rx);
131
132 CORO_RETURN(result);
133 }
134
135 private:
136 async_task<void> dispatched_task()
137 {
138 return launch_async([this, tx = rx.get_sender()](coro_context<async_task<void>>& ctx) mutable {
139 CORO_BEGIN(ctx);
140
141 callback();
142
143 tx.set();
144
145 CORO_RETURN();
146 });
147 }
148
149 fifo_async_task_scheduler& task_sched;
150 Callback callback;
151 event_receiver<void> rx;
152 };
153
154 return launch_async<task_offloader>(task_sched, std::forward<Callback>(task_to_run));
155}
Asynchronous task that sequentially runs other enqueued asynchronous tasks.
Definition fifo_async_task_scheduler.h:35

◆ when_completed_on_task_sched() [2/2]

template<typename Callback , typename ReturnType = detail::function_return_t<decltype(&std::decay_t<Callback>::operator())>, std::enable_if_t< not std::is_same< ReturnType, void >::value, int > = 0>
async_task< optional< ReturnType > > srsran::when_completed_on_task_sched ( fifo_async_task_scheduler & task_sched,
Callback && task_to_run )
162{
163 struct task_offloader {
164 task_offloader(fifo_async_task_scheduler& task_sched_, Callback&& callback_) :
165 task_sched(task_sched_), callback(std::forward<Callback>(callback_))
166 {
167 }
168
169 void operator()(coro_context<async_task<optional<ReturnType>>>& ctx)
170 {
171 CORO_BEGIN(ctx);
172
173 task_sched.schedule(dispatched_task());
174
175 CORO_AWAIT_VALUE(optional<ReturnType> result, rx);
176
177 CORO_RETURN(result);
178 }
179
180 private:
181 async_task<void> dispatched_task()
182 {
183 return launch_async([this, tx = rx.get_sender()](coro_context<async_task<void>>& ctx) mutable {
184 CORO_BEGIN(ctx);
185
186 tx.set(callback());
187
188 CORO_RETURN();
189 });
190 }
191
192 fifo_async_task_scheduler& task_sched;
193 Callback callback;
194 event_receiver<ReturnType> rx;
195 };
196
197 return launch_async<task_offloader>(task_sched, std::forward<Callback>(task_to_run));
198}

◆ window_size()

constexpr uint32_t srsran::window_size ( uint16_t sn_size)
constexpr

Returns the UM_Window_Size and AM_Window_Size Ref: 3GPP TS 38.322 Sec. 7.2.

Parameters
sn_sizeLength of the sequence number field in bits
Returns
size of the window
640{
641 return cardinality(sn_size - 1);
642}
constexpr uint32_t cardinality(uint16_t sn_size)
Returns the value range of the sequence numbers.
Definition rlc_config.h:629

◆ zero_msb_count()

template<typename Integer >
Integer srsran::zero_msb_count ( Integer value)

Counts the number of contiguous bits set to zero, starting from the MSB.

Template Parameters
IntegerInteger type of received bitmap.
Parameters
[in]valueInteger bitmap
Returns
count of bits set to zero.
216{
218}

Variable Documentation

◆ all_nr_bands_fr1

const std::array<nr_band, 60> srsran::all_nr_bands_fr1
Initial value:
= std::array<nr_band, 60>{
{nr_band::n1, nr_band::n2, nr_band::n3, nr_band::n5, nr_band::n7, nr_band::n8, nr_band::n12, nr_band::n13,
nr_band::n14, nr_band::n18, nr_band::n20, nr_band::n24, nr_band::n25, nr_band::n26, nr_band::n28, nr_band::n29,
nr_band::n30, nr_band::n34, nr_band::n38, nr_band::n39, nr_band::n40, nr_band::n41, nr_band::n46, nr_band::n48,
nr_band::n50, nr_band::n51, nr_band::n53, nr_band::n65, nr_band::n66, nr_band::n67, nr_band::n70, nr_band::n71,
nr_band::n74, nr_band::n75, nr_band::n76, nr_band::n77, nr_band::n78, nr_band::n79, nr_band::n80, nr_band::n81,
nr_band::n82, nr_band::n83, nr_band::n84, nr_band::n85, nr_band::n86, nr_band::n89, nr_band::n90, nr_band::n91,
nr_band::n92, nr_band::n93, nr_band::n94, nr_band::n95, nr_band::n96, nr_band::n97, nr_band::n98, nr_band::n99,
nr_band::n100, nr_band::n101, nr_band::n102, nr_band::n104}}
47 {
48 {nr_band::n1, nr_band::n2, nr_band::n3, nr_band::n5, nr_band::n7, nr_band::n8, nr_band::n12, nr_band::n13,
49 nr_band::n14, nr_band::n18, nr_band::n20, nr_band::n24, nr_band::n25, nr_band::n26, nr_band::n28, nr_band::n29,
50 nr_band::n30, nr_band::n34, nr_band::n38, nr_band::n39, nr_band::n40, nr_band::n41, nr_band::n46, nr_band::n48,
51 nr_band::n50, nr_band::n51, nr_band::n53, nr_band::n65, nr_band::n66, nr_band::n67, nr_band::n70, nr_band::n71,
52 nr_band::n74, nr_band::n75, nr_band::n76, nr_band::n77, nr_band::n78, nr_band::n79, nr_band::n80, nr_band::n81,
53 nr_band::n82, nr_band::n83, nr_band::n84, nr_band::n85, nr_band::n86, nr_band::n89, nr_band::n90, nr_band::n91,
54 nr_band::n92, nr_band::n93, nr_band::n94, nr_band::n95, nr_band::n96, nr_band::n97, nr_band::n98, nr_band::n99,
55 nr_band::n100, nr_band::n101, nr_band::n102, nr_band::n104}};

◆ do_not_optimize

template<typename T >
std::enable_if_t<!std::is_trivially_copyable< T >::value||(sizeof(T) > sizeof(T *)) srsran::do_not_optimize) (T &value) ( T const & value)
inline

This function forbids the compiler from optimizing away expressions without side-effects.

36{
37 asm volatile("" : : "r,m"(value) : "memory");
38}

◆ FR1_MAX_FREQUENCY_ARFCN

const unsigned srsran::FR1_MAX_FREQUENCY_ARFCN = 875000

SSB constants. FR1 = [ 410 MHz – 7125 MHz] (TS 38.101, Section 5.1) and ARFCN corresponding to 7.125GHz is 875000.

◆ GTPU_PORT

constexpr unsigned srsran::GTPU_PORT = 2152
constexpr

Port specified for Encapsulated T-PDUs, TS 29.281 Sec. 4.4.2.3

◆ invalid_protocol_transaction_id

constexpr protocol_transaction_id_t srsran::invalid_protocol_transaction_id
constexpr
Initial value:
=
std::numeric_limits<protocol_transaction_id_t>::max()

Invalid transaction id.

◆ MAX_LCID

constexpr lcid_t srsran::MAX_LCID = LCID_MAX_DRB
constexpr

Maximum value of Logical Channel ID.

Remarks
See TS 38.331, maxLC-ID.

◆ MAX_NOF_CORESETS_PER_BWP

constexpr size_t srsran::MAX_NOF_CORESETS_PER_BWP = 3
constexpr

Max number of CORESETs per BWP per cell (including UE-specific and common CORESETs).

Remarks
See TS 38.331, "PDCCH-Config".

◆ MAX_NOF_PRBS

constexpr std::size_t srsran::MAX_NOF_PRBS = 275
constexpr

Maximum number of PRBs of a UE carrier, for any SCS.

Remarks
See TS 38.331 - "maxNrofPhysicalResourceBlocks".

◆ MAX_NOF_PUCCH_RESOURCE_SETS

constexpr size_t srsran::MAX_NOF_PUCCH_RESOURCE_SETS = 4
constexpr

Maximum number of PUCCH Resource Sets.

Remarks
See TS 38.331, "maxNrofPUCCH-ResourceSets".

◆ MAX_NOF_PUCCH_RESOURCES

constexpr size_t srsran::MAX_NOF_PUCCH_RESOURCES = 128
constexpr

Maximum number of PUCCH resources.

Remarks
See TS 38.331, "maxNrofPUCCH-Resources".

◆ MAX_NOF_PUCCH_RESOURCES_PER_PUCCH_RESOURCE_SET

constexpr size_t srsran::MAX_NOF_PUCCH_RESOURCES_PER_PUCCH_RESOURCE_SET = 32
constexpr

Maximum number of PUCCH Resources per PUCCH-ResourceSet.

Remarks
See TS 38.331, "maxNrofPUCCH-ResourcesPerSet". Only valid for the first pucch_resource_set, see TS 38.213, Section 9.2.1.

◆ MAX_NOF_RBGS

const size_t srsran::MAX_NOF_RBGS = 18

Maximum number of resource block groups per BWP.

Remarks
See TS 38.214, Sections 5.1.2.2.1 and 6.1.2.2.1.

◆ MAX_NOF_SEARCH_SPACE_PER_BWP

constexpr size_t srsran::MAX_NOF_SEARCH_SPACE_PER_BWP = 10
constexpr
Remarks
See TS 38.331, "SearchSpaceId" - The number of Search Spaces per BWP is limited to 10 including the common and UE specific Search Spaces.

◆ MAX_NOF_SR_RESOURCES

constexpr size_t srsran::MAX_NOF_SR_RESOURCES = 8
constexpr

Maximum number of SR resources per BWP in a cell.

Remarks
See TS 38.331, "maxNrofSR-Resources".

◆ MAX_NUM_BEAMS

const unsigned srsran::MAX_NUM_BEAMS = 8

[Implementation defined] Max numbers of beams, to be used for SIB1 scheduler. NOTE: This is temporary, and valid only for FR1.

◆ nullopt

constexpr nullopt_t srsran::nullopt {0}
constexpr

Initializer for empty optional objects.

39{0};

◆ pdcp_control_pdu_max_size

constexpr size_t srsran::pdcp_control_pdu_max_size = 9000
constexpr

Maximum supported size of a PDCP Control PDU Ref: TS 38.323 Sec. 4.3.1

◆ pdcp_sdu_max_size

constexpr size_t srsran::pdcp_sdu_max_size = 9000
constexpr

Maximum supported size of a PDCP SDU Ref: TS 38.323 Sec. 4.3.1

◆ pdcp_tx_default_max_count_notify

const uint32_t srsran::pdcp_tx_default_max_count_notify = 0xc0000000

The PDCP cannot re-use COUNTs, see TS 38.331, section 5.3.1.2. To avoid this, we define two thresholds, one where we accept messages but notify the RRC and another where we no longer accept messages. Here, we define some default values for this, both for TX and RX.

◆ PLACEHOLDER_ONE

constexpr uint8_t srsran::PLACEHOLDER_ONE = 255
constexpr

UCI placeholder bit.

A placeholder for setting a bit to 1 in the scrambler. It is denoted as "\c x" in TS38.212 Section 5.3.3 and in TS38.211 Section 6.3.1.1.

◆ PLACEHOLDER_REPEAT

constexpr uint8_t srsran::PLACEHOLDER_REPEAT = 254
constexpr

UCI placeholder bit.

A placeholder for repeating the previous bit in the scrambler. It is denoted as "\c y" in TS38.212 Section 5.3.3 and in TS38.211 Section 6.3.1.1.

◆ SIB1_PERIODICITY

const unsigned srsran::SIB1_PERIODICITY = 160

SIB1 constants. SIB1 periodicity, see TS 38.331, Section 5.2.1.

◆ up_tracer

srsran::file_event_tracer< srsran::UP_TRACE_ENABLED > srsran::up_tracer
extern

UP event tracing. This tracer is used to analyze latencies in the CU-UP/DU high processing of the user plane traffic.